Interface JClassDef

    • Method Detail

      • _extends

        JClassDef _extends​(java.lang.String name)
        Add an extends type to this type.
        Parameters:
        name - the type name
        Returns:
        this type definition
      • _extends

        JClassDef _extends​(JType type)
        Add an extends type to this type.
        Parameters:
        type - the type
        Returns:
        this type definition
      • _extends

        JClassDef _extends​(java.lang.Class<?> clazz)
        Add an extends type to this type.
        Parameters:
        clazz - the type
        Returns:
        this type definition
      • _implements

        JClassDef _implements​(java.lang.String... name)
        Add one or more implements type(s) to this type.
        Parameters:
        name - the type name
        Returns:
        this type definition
      • _implements

        JClassDef _implements​(JType... type)
        Add one or more implements type(s) to this type.
        Parameters:
        type - the type
        Returns:
        this type definition
      • _implements

        JClassDef _implements​(java.lang.Class<?>... clazz)
        Add one or more implements type(s) to this type.
        Parameters:
        clazz - the type
        Returns:
        this type definition
      • erasedType

        JType erasedType()
        Get the erased type corresponding to this type definition.
        Returns:
        the erased type
      • genericType

        JType genericType()
        Get a generic type for this type definition, where the type arguments are the same as the type parameters of this type (as defined at the time this method is called).
        Returns:
        the generic type
      • _enum

        JEnumConstant _enum​(java.lang.String name)
        Add an enum constant. If the class being defined is not an enum, an exception is thrown.
        Parameters:
        name - the constant name
        Returns:
        the call for enum construction