Class TypeSimplifier
java.lang.Object
javax.lang.model.util.AbstractTypeVisitor6<TypeMirror,State>
javax.lang.model.util.SimpleTypeVisitor6<TypeMirror,State>
com.google.web.bindery.requestfactory.apt.TypeSimplifier
- All Implemented Interfaces:
TypeVisitor<TypeMirror,State>
Utility type for reducing complex type declarations to ones suitable for
determining assignability based on RequestFactory's type-mapping semantics.
Rules:
- primitive type
->boxed type (optional) void -> Void(optional)<T extends Foo> -> Foo? extends Foo -> FooFoo<complex type> -> Foo<simplified type>
-
Field Summary
Fields inherited from class javax.lang.model.util.SimpleTypeVisitor6
DEFAULT_VALUE -
Method Summary
Modifier and TypeMethodDescriptionprotected TypeMirrordefaultAction(TypeMirror x, State state) static TypeMirrorsimplify(TypeMirror toBox, boolean boxPrimitives, State state) visitDeclared(DeclaredType x, State state) visitNoType(NoType x, State state) visitPrimitive(PrimitiveType x, State state) visitTypeVariable(TypeVariable x, State state) visitWildcard(WildcardType x, State state) Methods inherited from class javax.lang.model.util.SimpleTypeVisitor6
visitArray, visitError, visitExecutable, visitNullMethods inherited from class javax.lang.model.util.AbstractTypeVisitor6
visit, visit, visitIntersection, visitUnion, visitUnknown
-
Method Details
-
simplify
-
visitDeclared
- Specified by:
visitDeclaredin interfaceTypeVisitor<TypeMirror,State> - Overrides:
visitDeclaredin classSimpleTypeVisitor6<TypeMirror,State>
-
visitNoType
- Specified by:
visitNoTypein interfaceTypeVisitor<TypeMirror,State> - Overrides:
visitNoTypein classSimpleTypeVisitor6<TypeMirror,State>
-
visitPrimitive
- Specified by:
visitPrimitivein interfaceTypeVisitor<TypeMirror,State> - Overrides:
visitPrimitivein classSimpleTypeVisitor6<TypeMirror,State>
-
visitTypeVariable
- Specified by:
visitTypeVariablein interfaceTypeVisitor<TypeMirror,State> - Overrides:
visitTypeVariablein classSimpleTypeVisitor6<TypeMirror,State>
-
visitWildcard
- Specified by:
visitWildcardin interfaceTypeVisitor<TypeMirror,State> - Overrides:
visitWildcardin classSimpleTypeVisitor6<TypeMirror,State>
-
defaultAction
- Overrides:
defaultActionin classSimpleTypeVisitor6<TypeMirror,State>
-