Class TypeReferenceExtension


  • public class TypeReferenceExtension
    extends Object
    • Constructor Detail

      • TypeReferenceExtension

        public TypeReferenceExtension()
    • Method Detail

      • getTarget

        public static Type getTarget​(TypeReference me)
        Returns the type referenced by this TypeReference considering all concrete subclasses of TypeReference used by the Java metamodel.
        Returns:
        the referenced type
      • setTarget

        public static void setTarget​(TypeReference me,
                                     Classifier type)
        Sets the type targeted by this type reference
        Parameters:
        type - the new type to set as target.
      • getBoundTarget

        public static Type getBoundTarget​(TypeReference me,
                                          Reference reference)
        Returns the type referenced by this TypeReference considering all concrete subclasses of TypeReference used by the Java metamodel. If type parameters are bound in the given reference, the bound type will be returned instead of the parameter.
        Parameters:
        reference - .
        Returns:
        the referenced type.
      • getPureClassifierReference

        public static ClassifierReference getPureClassifierReference​(TypeReference me)
        Extracts the (possibly nested) classifier reference (if any) from this type references.
        Returns: