This file describes the representation of Java 5/6/7 types in JTransformer. With the exception of classT all PEFs explained below have been introduced in JTransformer 3.
We use the term “atomic type” for every type that cannot be split further. In Java 5, only basic types (int, double, …) and class types are atomic:
Java 5 introduces the concept of type parameters (and wildcards, which are just very special type parameters):
An inner class can access the type parameters of its outer class via:
Program element facts reference atomic types and type parameters uniformly via a type reference (typeRefT). Type references, array types and parameterized types are the root of a type subtree. They are represented by the following PEFs:
Most of the time, you do not need to deal with type references but can use the utility method
where Element is the ID of an AST node element and Type is the id of the PEF for the type of that element, that is the id of a
This utility method only works for elements that have a unique type. It does not work for generic types with many type paremeters, since it is not clear which one is meant.