Interface Type
-
- All Known Subinterfaces:
Type.Defined,Type.Nonprimitive,Type.Wildcard
- All Known Implementing Classes:
Type.Array,Type.Parameterized,Type.Primitive,Type.Reference,Type.Variable,Type.Wildcard.Extends,Type.Wildcard.Super
public interface TypeI've created this type model as an experiment which I want to bring forward and evolve into something more general purpose, probably, an utility library some day. The idea here is to give practical, yet accurate depiction of the type system in java using immutable types, being lightweight, efficient and easy to analyse and transform. Apparently, neitherjava.lang.reflectnorjavax.lang.model(nor any 3rd party lib I've seen) are not suitable for anything I want to do.What we tried to avoid:
- Compicated reverse references and mutability
- Idealism and unrealistic overgeneralization (
WildcardTypeanyone?) - Complicated types like intersection or unions where we get without them
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classType.Arraystatic interfaceType.Definedstatic interfaceType.Factorystatic interfaceType.Nonprimitivestatic classType.Parameterizedstatic interfaceType.Parametersstatic classType.Parserstatic classType.Primitivestatic classType.Printstatic classType.Producerstatic classType.Referencestatic classType.Templatestatic classType.Transformerstatic classType.Variablestatic classType.VariableResolverstatic interfaceType.Visitor<V>static interfaceType.Wildcard
-
Field Summary
Fields Modifier and Type Field Description static Type.ReferenceOBJECT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> Vaccept(Type.Visitor<V> visitor)
-
-
-
Field Detail
-
OBJECT
static final Type.Reference OBJECT
-
-
Method Detail
-
accept
<V> V accept(Type.Visitor<V> visitor)
-
-