Class JvmTypeReferenceBuilder


  • public class JvmTypeReferenceBuilder
    extends java.lang.Object
    Since:
    2.7
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.xtext.common.types.JvmTypeReference typeRef​(java.lang.Class<?> clazz, org.eclipse.xtext.common.types.JvmTypeReference... typeArgs)
      Creates a new JvmTypeReference pointing to the given class and containing the given type arguments.
      org.eclipse.xtext.common.types.JvmTypeReference typeRef​(java.lang.String typeName, org.eclipse.xtext.common.types.JvmTypeReference... typeArgs)
      Creates a new JvmTypeReference pointing to the given class and containing the given type arguments.
      org.eclipse.xtext.common.types.JvmTypeReference typeRef​(org.eclipse.xtext.common.types.JvmType type, org.eclipse.xtext.common.types.JvmTypeReference... typeArgs)
      Creates a new JvmTypeReference pointing to the given class and containing the given type arguments.
      org.eclipse.xtext.common.types.JvmTypeReference wildcard()
      Creates a new wildcard type reference with upper bound Object.
      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.
      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 and Object as upper bound.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JvmTypeReferenceBuilder

        public JvmTypeReferenceBuilder()
    • Method Detail

      • typeRef

        public org.eclipse.xtext.common.types.JvmTypeReference typeRef​(java.lang.Class<?> clazz,
                                                                       org.eclipse.xtext.common.types.JvmTypeReference... typeArgs)
        Creates a new JvmTypeReference pointing 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 new JvmTypeReference pointing 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 new JvmTypeReference pointing 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 and Object as 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 bound Object. I.e.
        ? extends Object
        Returns:
        the newly created wildcard type reference