Package org.eclipse.xtext.xbase.jvmmodel
Class JvmTypeReferenceBuilder
- java.lang.Object
-
- org.eclipse.xtext.xbase.jvmmodel.JvmTypeReferenceBuilder
-
public class JvmTypeReferenceBuilder extends java.lang.Object- Since:
- 2.7
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJvmTypeReferenceBuilder.Factory
-
Constructor Summary
Constructors Constructor Description JvmTypeReferenceBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.xtext.common.types.JvmTypeReferencetypeRef(java.lang.Class<?> clazz, org.eclipse.xtext.common.types.JvmTypeReference... typeArgs)Creates a newJvmTypeReferencepointing to the given class and containing the given type arguments.org.eclipse.xtext.common.types.JvmTypeReferencetypeRef(java.lang.String typeName, org.eclipse.xtext.common.types.JvmTypeReference... typeArgs)Creates a newJvmTypeReferencepointing to the given class and containing the given type arguments.org.eclipse.xtext.common.types.JvmTypeReferencetypeRef(org.eclipse.xtext.common.types.JvmType type, org.eclipse.xtext.common.types.JvmTypeReference... typeArgs)Creates a newJvmTypeReferencepointing to the given class and containing the given type arguments.org.eclipse.xtext.common.types.JvmTypeReferencewildcard()Creates a new wildcard type reference with upper boundObject.org.eclipse.xtext.common.types.JvmTypeReferencewildcardExtends(org.eclipse.xtext.common.types.JvmTypeReference extendsBound)Creates a new wildcard type reference with the given type as the upper bound.org.eclipse.xtext.common.types.JvmTypeReferencewildcardSuper(org.eclipse.xtext.common.types.JvmTypeReference superBound)Creates a new wildcard type reference with the given type as the lower bound andObjectas upper bound.
-
-
-
Method Detail
-
typeRef
public org.eclipse.xtext.common.types.JvmTypeReference typeRef(java.lang.Class<?> clazz, org.eclipse.xtext.common.types.JvmTypeReference... typeArgs)Creates a newJvmTypeReferencepointing to the given class and containing the given type arguments.- Parameters:
clazz- the class the type reference shall point to.typeArgs- type arguments- Returns:
- the newly created
JvmTypeReference
-
typeRef
public org.eclipse.xtext.common.types.JvmTypeReference typeRef(java.lang.String typeName, org.eclipse.xtext.common.types.JvmTypeReference... typeArgs)Creates a newJvmTypeReferencepointing to the given class and containing the given type arguments.- Parameters:
typeName- the name of the type the reference shall point to.typeArgs- type arguments- Returns:
- the newly created
JvmTypeReference
-
typeRef
public org.eclipse.xtext.common.types.JvmTypeReference typeRef(org.eclipse.xtext.common.types.JvmType type, org.eclipse.xtext.common.types.JvmTypeReference... typeArgs)Creates a newJvmTypeReferencepointing to the given class and containing the given type arguments.- Parameters:
type- the type the reference shall point to.typeArgs- type arguments- Returns:
- the newly created
JvmTypeReference
-
wildcardExtends
public org.eclipse.xtext.common.types.JvmTypeReference wildcardExtends(org.eclipse.xtext.common.types.JvmTypeReference extendsBound)
Creates a new wildcard type reference with the given type as the upper bound. For example:wildcardExtends(typeRef(CharSequence))
would create a type reference representing? extends CharSequence
- Parameters:
extendsBound- the upper bound of the wildcard- Returns:
- the newly created wildcard type reference
-
wildcardSuper
public org.eclipse.xtext.common.types.JvmTypeReference wildcardSuper(org.eclipse.xtext.common.types.JvmTypeReference superBound)
Creates a new wildcard type reference with the given type as the lower bound andObjectas upper bound. For example:wildcardSuper(typeRef(CharSequence))
would create a type reference representing? super CharSequence
- Parameters:
superBound- the super bound of the wildcard- Returns:
- the newly created wildcard type reference
-
wildcard
public org.eclipse.xtext.common.types.JvmTypeReference wildcard()
Creates a new wildcard type reference with upper boundObject. I.e.? extends Object
- Returns:
- the newly created wildcard type reference
-
-