Class TypeReferenceExtension

java.lang.Object
tools.mdsd.jamopp.model.java.extensions.types.TypeReferenceExtension

public final class TypeReferenceExtension extends Object
  • Method Details

    • getTarget

      public static Type getTarget(TypeReference typeReference)
      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 typeReference, 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 typeReference, 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 typeReference)
      Extracts the (possibly nested) classifier reference (if any) from this type references.
      Returns: