public class StandardTypeReferenceOwner extends Object implements ITypeReferenceOwner
ITypeReferenceOwner.
It is not capable of handling reference resolution or unbound type argument hints.| Constructor and Description |
|---|
StandardTypeReferenceOwner(CommonTypeComputationServices services,
org.eclipse.emf.ecore.EObject context) |
StandardTypeReferenceOwner(CommonTypeComputationServices services,
org.eclipse.emf.ecore.resource.Resource context) |
StandardTypeReferenceOwner(CommonTypeComputationServices services,
org.eclipse.emf.ecore.resource.ResourceSet context) |
public StandardTypeReferenceOwner(CommonTypeComputationServices services, org.eclipse.emf.ecore.resource.ResourceSet context)
public StandardTypeReferenceOwner(CommonTypeComputationServices services, org.eclipse.emf.ecore.EObject context)
public StandardTypeReferenceOwner(CommonTypeComputationServices services, org.eclipse.emf.ecore.resource.Resource context)
public CommonTypeComputationServices getServices()
ITypeReferenceOwnergetServices in interface ITypeReferenceOwnerpublic LightweightTypeReferenceFactory getFactory()
public void setFactory(LightweightTypeReferenceFactory factory)
public org.eclipse.emf.ecore.resource.ResourceSet getContextResourceSet()
getContextResourceSet in interface ITypeReferenceOwnerpublic void acceptHint(Object handle, LightweightBoundTypeArgument boundTypeArgument)
acceptHint in interface ITypeReferenceOwnerUnsupportedOperationException - alwayspublic List<LightweightBoundTypeArgument> getAllHints(Object handle)
getAllHints in interface ITypeReferenceOwnerUnsupportedOperationException - alwayspublic boolean isResolved(Object handle)
isResolved in interface ITypeReferenceOwnerUnsupportedOperationException - alwayspublic List<JvmTypeParameter> getDeclaredTypeParameters()
ITypeReferenceOwnergetDeclaredTypeParameters in interface ITypeReferenceOwnerpublic LightweightTypeReference toPlainTypeReference(JvmType type)
ITypeReferenceOwnerJvmArrayType,
an ArrayTypeReference is produced. The produced LightweightTypeReference does not
have any type arguments. It is similar to a raw type reference except for cases where the type
points to a JvmTypeParameter or an array of type parameters. In
those cases, the result is different form toPlainTypeReference(JvmType).
getRawTypeReference().toPlainTypeReference in interface ITypeReferenceOwnertype - the type. May not be null.public LightweightTypeReference toLightweightTypeReference(JvmType type)
ITypeReferenceOwnerJvmArrayType,
an ArrayTypeReference is produced. The produced LightweightTypeReference does have
type arguments if the given type is generic or an array of a generic type. The type arguments point
to the original type parameters.
Useful for later substitution of all type parameters.toLightweightTypeReference in interface ITypeReferenceOwnertype - the raw type. May not be null.public LightweightTypeReference toLightweightTypeReference(JvmTypeReference type)
ITypeReferenceOwnerLightweightTypeReference
hierarchy.toLightweightTypeReference in interface ITypeReferenceOwnertype - the type to convert. May not be null.public CompoundTypeReference newCompoundTypeReference(boolean synonym)
ITypeReferenceOwnerCompoundTypeReference that is either a synonym
or a multi type reference.newCompoundTypeReference in interface ITypeReferenceOwnersynonym - whether it should be a synonym type reference.public WildcardTypeReference newWildcardTypeReference()
ITypeReferenceOwnerWildcardTypeReference without any upper or lower bounds.
Usually clients need to add those to make it a valid type reference.newWildcardTypeReference in interface ITypeReferenceOwnerpublic ArrayTypeReference newArrayTypeReference(LightweightTypeReference componentTypeReference)
ITypeReferenceOwnerArrayTypeReference with the given component type.newArrayTypeReference in interface ITypeReferenceOwnerpublic FunctionTypeReference newFunctionTypeReference(JvmType type)
ITypeReferenceOwnerFunctionTypeReference that is backed by the given type. Constraints apply
as in ITypeReferenceOwner.newParameterizedTypeReference(JvmType).
Clients are responsible to pass a valid SAM type to ITypeReferenceOwner.newFunctionTypeReference(JvmType).newFunctionTypeReference in interface ITypeReferenceOwnertype - the raw function type.public InnerFunctionTypeReference newFunctionTypeReference(LightweightTypeReference outer, JvmType type)
ITypeReferenceOwnerInnerFunctionTypeReference that is backed by the given type and has to
defined outer type. Constraints apply as in ITypeReferenceOwner.newFunctionTypeReference(JvmType) and
ITypeReferenceOwner.newParameterizedTypeReference(LightweightTypeReference, JvmType).newFunctionTypeReference in interface ITypeReferenceOwnerouter - the outer type reference.type - the raw type for the newly produced ParameterizedTypeReferencepublic ParameterizedTypeReference newParameterizedTypeReference(JvmType type)
ITypeReferenceOwnerParameterizedTypeReference from the given type. The type
may either be a JvmTypeParameter, JvmPrimitiveType, JvmDeclaredType
or JvmVoid. Other types are considered invalid and will cause an IllegalArgumentException
to be thrown.
If the type is a non-static nested type, the produced type reference will be an
InnerTypeReference.
The produced type reference does not have any type arguments. If the given type is generic,
the returned type reference is a raw type.newParameterizedTypeReference in interface ITypeReferenceOwnertype - the raw type for the newly produced ParameterizedTypeReferencepublic InnerTypeReference newParameterizedTypeReference(LightweightTypeReference outer, JvmType type)
ITypeReferenceOwnerInnerTypeReference. Constraints apply as with ITypeReferenceOwner.newParameterizedTypeReference(JvmType).
If type does not represent a non-static inner class, an exception is thrown.
This method produces references of the form Outer<OuterParams>.Type.newParameterizedTypeReference in interface ITypeReferenceOwnerouter - the outer type reference.type - the raw type for the newly produced ParameterizedTypeReferencepublic UnknownTypeReference newUnknownTypeReference()
ITypeReferenceOwnerUnknownTypeReference.newUnknownTypeReference in interface ITypeReferenceOwnerpublic UnknownTypeReference newUnknownTypeReference(String name)
ITypeReferenceOwnerUnknownTypeReference.newUnknownTypeReference in interface ITypeReferenceOwnerpublic AnyTypeReference newAnyTypeReference()
ITypeReferenceOwnerany type, e.g. the type of the
value null.newAnyTypeReference in interface ITypeReferenceOwnerpublic LightweightTypeReference newReferenceToObject()
Object or returns an UnknownTypeReference if no
JRE is available.newReferenceToObject in interface ITypeReferenceOwnerpublic WildcardTypeReference newWildcardExtendsObject()
Object or returns a wildcard to an UnknownTypeReference if no
JRE is available.newWildcardExtendsObject in interface ITypeReferenceOwnerpublic LightweightTypeReference newReferenceTo(Class<?> type)
UnknownTypeReference if no
JRE is available.newReferenceTo in interface ITypeReferenceOwnerpublic LightweightTypeReference newReferenceTo(Class<?> type, TypeReferenceInitializer<? super ParameterizedTypeReference> init)
UnknownTypeReference if no
JRE is available. If the type is available, the given acceptor is used to initialize it further.newReferenceTo in interface ITypeReferenceOwnerCopyright © 2015. All Rights Reserved.