Class TypeSimplifier
- java.lang.Object
-
- javax.lang.model.util.AbstractTypeVisitor6<R,P>
-
- javax.lang.model.util.SimpleTypeVisitor6<javax.lang.model.type.TypeMirror,State>
-
- com.google.web.bindery.requestfactory.apt.TypeSimplifier
-
- All Implemented Interfaces:
javax.lang.model.type.TypeVisitor<javax.lang.model.type.TypeMirror,State>
public class TypeSimplifier extends javax.lang.model.util.SimpleTypeVisitor6<javax.lang.model.type.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>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.lang.model.type.TypeMirrordefaultAction(javax.lang.model.type.TypeMirror x, State state)static javax.lang.model.type.TypeMirrorsimplify(javax.lang.model.type.TypeMirror toBox, boolean boxPrimitives, State state)javax.lang.model.type.TypeMirrorvisitDeclared(javax.lang.model.type.DeclaredType x, State state)javax.lang.model.type.TypeMirrorvisitNoType(javax.lang.model.type.NoType x, State state)javax.lang.model.type.TypeMirrorvisitPrimitive(javax.lang.model.type.PrimitiveType x, State state)javax.lang.model.type.TypeMirrorvisitTypeVariable(javax.lang.model.type.TypeVariable x, State state)javax.lang.model.type.TypeMirrorvisitWildcard(javax.lang.model.type.WildcardType x, State state)-
Methods inherited from class javax.lang.model.util.SimpleTypeVisitor6
visitArray, visitError, visitExecutable, visitNull
-
-
-
-
Method Detail
-
simplify
public static javax.lang.model.type.TypeMirror simplify(javax.lang.model.type.TypeMirror toBox, boolean boxPrimitives, State state)
-
visitDeclared
public javax.lang.model.type.TypeMirror visitDeclared(javax.lang.model.type.DeclaredType x, State state)
-
visitNoType
public javax.lang.model.type.TypeMirror visitNoType(javax.lang.model.type.NoType x, State state)
-
visitPrimitive
public javax.lang.model.type.TypeMirror visitPrimitive(javax.lang.model.type.PrimitiveType x, State state)
-
visitTypeVariable
public javax.lang.model.type.TypeMirror visitTypeVariable(javax.lang.model.type.TypeVariable x, State state)
-
visitWildcard
public javax.lang.model.type.TypeMirror visitWildcard(javax.lang.model.type.WildcardType x, State state)
-
-