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 Type
    I'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, neither java.lang.reflect nor javax.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 (WildcardType anyone?)
    • Complicated types like intersection or unions where we get without them
    Moreover we are only concerned with the types in signatures, not a whole spectre of types which might occur in java code.