public class UnitsRelationsDefault extends java.lang.Object implements UnitsRelations
Modifier and Type | Field and Description |
---|---|
protected javax.lang.model.util.Elements |
elements |
protected javax.lang.model.element.AnnotationMirror |
h |
protected javax.lang.model.element.AnnotationMirror |
km |
protected javax.lang.model.element.AnnotationMirror |
km2 |
protected javax.lang.model.element.AnnotationMirror |
kmPERh |
protected javax.lang.model.element.AnnotationMirror |
m |
protected javax.lang.model.element.AnnotationMirror |
m2 |
protected javax.lang.model.element.AnnotationMirror |
mm |
protected javax.lang.model.element.AnnotationMirror |
mm2 |
protected javax.lang.model.element.AnnotationMirror |
mPERs |
protected javax.lang.model.element.AnnotationMirror |
mPERs2 |
protected javax.lang.model.element.AnnotationMirror |
s |
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 javax.lang.model.element.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,
javax.lang.model.element.AnnotationMirror ul,
AnnotatedTypeMirror rht,
javax.lang.model.element.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,
javax.lang.model.element.AnnotationMirror u1,
AnnotatedTypeMirror rht,
javax.lang.model.element.AnnotationMirror u2)
Checks to see if lht and rht have the pair of units u1 and u2 regardless of order
|
UnitsRelations |
init(javax.annotation.processing.ProcessingEnvironment env)
Constructs various AnnotationMirrors representing specific checker-framework provided Units
involved in the rules resolved in this UnitsRelations implementation
|
@Nullable javax.lang.model.element.AnnotationMirror |
multiplication(AnnotatedTypeMirror lht,
AnnotatedTypeMirror rht)
Provides rules for resolving the result Unit of the multiplication of checker-framework
provided Units
|
protected javax.lang.model.element.AnnotationMirror m
protected javax.lang.model.element.AnnotationMirror km
protected javax.lang.model.element.AnnotationMirror mm
protected javax.lang.model.element.AnnotationMirror m2
protected javax.lang.model.element.AnnotationMirror km2
protected javax.lang.model.element.AnnotationMirror mm2
protected javax.lang.model.element.AnnotationMirror s
protected javax.lang.model.element.AnnotationMirror h
protected javax.lang.model.element.AnnotationMirror mPERs
protected javax.lang.model.element.AnnotationMirror kmPERh
protected javax.lang.model.element.AnnotationMirror mPERs2
protected javax.lang.model.util.Elements elements
public UnitsRelations init(javax.annotation.processing.ProcessingEnvironment env)
init
in interface UnitsRelations
env
- the ProcessingEnvironment to usepublic @Nullable javax.lang.model.element.AnnotationMirror multiplication(AnnotatedTypeMirror lht, AnnotatedTypeMirror rht)
multiplication
in interface UnitsRelations
lht
- left hand side in multiplicationrht
- right hand side in multiplicationpublic @Nullable javax.lang.model.element.AnnotationMirror division(AnnotatedTypeMirror lht, AnnotatedTypeMirror rht)
division
in interface UnitsRelations
lht
- 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, javax.lang.model.element.AnnotationMirror ul, AnnotatedTypeMirror rht, javax.lang.model.element.AnnotationMirror ur)
lht
- left hand annotated typeul
- left hand unitrht
- right hand annotated typeur
- right hand unitprotected boolean havePairOfUnitsIgnoringOrder(AnnotatedTypeMirror lht, javax.lang.model.element.AnnotationMirror u1, AnnotatedTypeMirror rht, javax.lang.model.element.AnnotationMirror u2)
lht
- left hand annotated typeu1
- unit 1rht
- right hand annotated typeu2
- unit 2