Class TypeReferenceExtension
- java.lang.Object
-
- org.emftext.language.java.extensions.types.TypeReferenceExtension
-
public class TypeReferenceExtension extends Object
-
-
Constructor Summary
Constructors Constructor Description TypeReferenceExtension()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Type
getBoundTarget(TypeReference me, Reference reference)
Returns the type referenced by thisTypeReference
considering all concrete subclasses ofTypeReference
used by the Java metamodel.static ClassifierReference
getPureClassifierReference(TypeReference me)
Extracts the (possibly nested) classifier reference (if any) from this type references.static Type
getTarget(TypeReference me)
Returns the type referenced by thisTypeReference
considering all concrete subclasses ofTypeReference
used by the Java metamodel.static void
setTarget(TypeReference me, Classifier type)
Sets the type targeted by this type reference
-
-
-
Method Detail
-
getTarget
public static Type getTarget(TypeReference me)
Returns the type referenced by thisTypeReference
considering all concrete subclasses ofTypeReference
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 thisTypeReference
considering all concrete subclasses ofTypeReference
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:
-
-