public class UnitsRelationsDefault extends Object implements UnitsRelations
TODO: what relations are missing?
| Modifier and Type | Field and Description | 
|---|---|
protected Elements | 
elements
The Element Utilities from the Units Checker's processing environment. 
 | 
protected AnnotationMirror | 
h
SI units. 
 | 
protected AnnotationMirror | 
km
SI units. 
 | 
protected AnnotationMirror | 
km2
SI units. 
 | 
protected AnnotationMirror | 
kmPERh
SI units. 
 | 
protected AnnotationMirror | 
m
SI units. 
 | 
protected AnnotationMirror | 
m2
SI units. 
 | 
protected AnnotationMirror | 
mm
SI units. 
 | 
protected AnnotationMirror | 
mm2
SI units. 
 | 
protected AnnotationMirror | 
mPERs
SI units. 
 | 
protected AnnotationMirror | 
mPERs2
SI units. 
 | 
protected AnnotationMirror | 
s
SI 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