|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcheckers.types.TypeHierarchy
public class TypeHierarchy
Class to test AnnotatedTypeMirrors subtype relationships.
The implementation uses the regular traditional java subtyping rules
namely, assuming qual(A) := qualifier on A and
|A| = type without qualifier:
| Constructor Summary | |
|---|---|
TypeHierarchy(QualifierHierarchy qualifierHierarchy)
Constructs an instance of TypeHierarchy for the type system
whose qualifiers represented in qualifierHierarchy. |
|
| Method Summary | |
|---|---|
protected boolean |
compareArrayComponent(AnnotatedTypeMirror.AnnotatedArrayType rhs,
AnnotatedTypeMirror.AnnotatedArrayType lhs)
Checks that the rhs component type is a subtype of the lhs component type. |
protected boolean |
compareTypeArg(AnnotatedTypeMirror rhs,
AnnotatedTypeMirror lhs)
Compares two types that are are found within type arguments. |
protected boolean |
compareTypeArguments(AnnotatedTypeMirror.AnnotatedDeclaredType rhs,
AnnotatedTypeMirror.AnnotatedDeclaredType lhs)
Only compares the type arguments of rhs and lhs. |
boolean |
isSubtype(AnnotatedTypeMirror rhs,
AnnotatedTypeMirror lhs)
Checks whether rhs is a subtype of lhs |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TypeHierarchy(QualifierHierarchy qualifierHierarchy)
TypeHierarchy for the type system
whose qualifiers represented in qualifierHierarchy.
qualifierHierarchy - | Method Detail |
|---|
protected boolean compareTypeArg(AnnotatedTypeMirror rhs,
AnnotatedTypeMirror lhs)
rhs - a type argumentlhs - a type argument
protected boolean compareTypeArguments(AnnotatedTypeMirror.AnnotatedDeclaredType rhs,
AnnotatedTypeMirror.AnnotatedDeclaredType lhs)
rhs - a declared typelhs - a declared type
protected boolean compareArrayComponent(AnnotatedTypeMirror.AnnotatedArrayType rhs,
AnnotatedTypeMirror.AnnotatedArrayType lhs)
rhs - an array type: right side of an assignmentlhs - an array type: left side of an assignment
public final boolean isSubtype(AnnotatedTypeMirror rhs,
AnnotatedTypeMirror lhs)
rhs - an annotated typelhs - an annotated type
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||