public class UnitsRelationsDefault extends Object implements UnitsRelations
| Modifier and Type | Field and Description | 
|---|---|
| protected Elements | elementsThe Element Utilities from the Units Checker's processing environment. | 
| protected AnnotationMirror | hSI units. | 
| protected AnnotationMirror | kmSI units. | 
| protected AnnotationMirror | km2SI units. | 
| protected AnnotationMirror | kmPERhSI units. | 
| protected AnnotationMirror | mSI units. | 
| protected AnnotationMirror | m2SI units. | 
| protected AnnotationMirror | mmSI units. | 
| protected AnnotationMirror | mm2SI units. | 
| protected AnnotationMirror | mPERsSI units. | 
| protected AnnotationMirror | mPERs2SI units. | 
| protected AnnotationMirror | sSI units. | 
| Constructor and Description | 
|---|
| UnitsRelationsDefault() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected boolean | bothHaveSpecificPrefix(Prefix lhtPrefix,
                      Prefix rhtPrefix,
                      Prefix specificPrefix)Checks to see if both lhtPrefix and rhtPrefix have the same prefix as specificPrefix. | 
| @Nullable AnnotationMirror | division(AnnotatedTypeMirror lht,
        AnnotatedTypeMirror rht)Provides rules for resolving the result Unit of the division of checker-framework provided
 Units. | 
| protected boolean | havePairOfUnits(AnnotatedTypeMirror lht,
               AnnotationMirror ul,
               AnnotatedTypeMirror rht,
               AnnotationMirror ur)Checks to see if lht has the unit ul and if rht has the unit ur all at the same time. | 
| protected boolean | havePairOfUnitsIgnoringOrder(AnnotatedTypeMirror lht,
                            AnnotationMirror u1,
                            AnnotatedTypeMirror rht,
                            AnnotationMirror u2)Checks to see if lht and rht have the pair of units u1 and u2 regardless of order. | 
| UnitsRelations | init(ProcessingEnvironment env)Constructs various AnnotationMirrors representing specific checker-framework provided Units
 involved in the rules resolved in this UnitsRelations implementation. | 
| @Nullable AnnotationMirror | multiplication(AnnotatedTypeMirror lht,
              AnnotatedTypeMirror rht)Provides rules for resolving the result Unit of the multiplication of checker-framework
 provided Units. | 
protected AnnotationMirror m
protected AnnotationMirror km
protected AnnotationMirror mm
protected AnnotationMirror m2
protected AnnotationMirror km2
protected AnnotationMirror mm2
protected AnnotationMirror s
protected AnnotationMirror h
protected AnnotationMirror mPERs
protected AnnotationMirror kmPERh
protected AnnotationMirror mPERs2
protected Elements elements
public UnitsRelations init(ProcessingEnvironment env)
init in interface UnitsRelationsenv - the ProcessingEnvironment to usepublic @Nullable AnnotationMirror multiplication(AnnotatedTypeMirror lht, AnnotatedTypeMirror rht)
multiplication in interface UnitsRelationslht - left hand side in multiplicationrht - right hand side in multiplicationpublic @Nullable AnnotationMirror division(AnnotatedTypeMirror lht, AnnotatedTypeMirror rht)
division in interface UnitsRelationslht - left hand side in divisionrht - right hand side in divisionprotected boolean bothHaveSpecificPrefix(Prefix lhtPrefix, Prefix rhtPrefix, Prefix specificPrefix)
lhtPrefix - left hand side prefixrhtPrefix - right hand side prefixspecificPrefix - specific desired prefix to matchprotected boolean havePairOfUnits(AnnotatedTypeMirror lht, AnnotationMirror ul, AnnotatedTypeMirror rht, AnnotationMirror ur)
lht - left hand annotated typeul - left hand unitrht - right hand annotated typeur - right hand unitprotected boolean havePairOfUnitsIgnoringOrder(AnnotatedTypeMirror lht, AnnotationMirror u1, AnnotatedTypeMirror rht, AnnotationMirror u2)
lht - left hand annotated typeu1 - unit 1rht - right hand annotated typeu2 - unit 2