Class TypeSimplifier
java.lang.Object
javax.lang.model.util.AbstractTypeVisitor6<R,P>
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 -> Foo
Foo<complex type> -> Foo<simplified type>
-
Field Summary
Fields inherited from class javax.lang.model.util.SimpleTypeVisitor6
DEFAULT_VALUE
-
Method Summary
Modifier and TypeMethodDescriptionprotected TypeMirror
defaultAction
(TypeMirror x, State state) static TypeMirror
simplify
(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, visitNull
Methods inherited from class javax.lang.model.util.AbstractTypeVisitor6
visit, visit, visitIntersection, visitUnion, visitUnknown
-
Method Details
-
simplify
-
visitDeclared
- Specified by:
visitDeclared
in interfaceTypeVisitor<TypeMirror,
State> - Overrides:
visitDeclared
in classSimpleTypeVisitor6<TypeMirror,
State>
-
visitNoType
- Specified by:
visitNoType
in interfaceTypeVisitor<TypeMirror,
State> - Overrides:
visitNoType
in classSimpleTypeVisitor6<TypeMirror,
State>
-
visitPrimitive
- Specified by:
visitPrimitive
in interfaceTypeVisitor<TypeMirror,
State> - Overrides:
visitPrimitive
in classSimpleTypeVisitor6<TypeMirror,
State>
-
visitTypeVariable
- Specified by:
visitTypeVariable
in interfaceTypeVisitor<TypeMirror,
State> - Overrides:
visitTypeVariable
in classSimpleTypeVisitor6<TypeMirror,
State>
-
visitWildcard
- Specified by:
visitWildcard
in interfaceTypeVisitor<TypeMirror,
State> - Overrides:
visitWildcard
in classSimpleTypeVisitor6<TypeMirror,
State>
-
defaultAction
- Overrides:
defaultAction
in classSimpleTypeVisitor6<TypeMirror,
State>
-