Class CType.WType<T>

  • All Implemented Interfaces:
    CTypeI<T>, ToString
    Enclosing class:
    CType<T>

    public static final class CType.WType<T>
    extends CType<T>
    • Constructor Detail

      • WType

        public WType​(java.lang.reflect.TypeVariable<?> type)
    • Method Detail

      • getComponentByName

        public CTypeI<java.lang.Object> getComponentByName​(java.lang.String name)
        Description copied from interface: CTypeI
        Gets the component type by name for parameterized types.
        Parameters:
        name - the name of the type parameter
        Returns:
        the component type, or null if not found
      • addAnnotations

        public CTypeI<T> addAnnotations​(java.lang.annotation.Annotation... aa)
        Description copied from interface: CTypeI
        Adds annotations to this type and returns a new type instance with the annotations.
        Specified by:
        addAnnotations in interface CTypeI<T>
        Overrides:
        addAnnotations in class CType<T>
        Parameters:
        aa - the annotations to add
        Returns:
        a new type instance with the added annotations
      • getRaw

        public java.lang.Class<T> getRaw()
        Description copied from interface: CTypeI
        Gets the raw class representing this type.
        Returns:
        the raw class
      • instanceOf

        public boolean instanceOf​(java.lang.reflect.Type t)
        Description copied from interface: CTypeI
        Checks if this type is an instance of the specified type.
        Parameters:
        t - the type to check against
        Returns:
        true if this type is an instance of the specified type, false otherwise
      • toType

        @NotNull
        public @NotNull java.lang.reflect.Type toType()
        Description copied from interface: CTypeI
        Converts this type to a standard Type object.
        Returns:
        the Type representation
      • isPrimitive

        public boolean isPrimitive()
        Description copied from interface: CTypeI
        Checks if this type represents a primitive type.
        Returns:
        true if this is a primitive type, false otherwise
      • resolveReturnType

        public CTypeI<java.lang.Object> resolveReturnType​(java.lang.reflect.Method m)
        Description copied from interface: CTypeI
        Resolves the return type of the specified method in the context of this type.
        Parameters:
        m - the method
        Returns:
        the resolved return type
      • resolveTypeArgs

        public CTypeI<java.lang.Object>[] resolveTypeArgs​(java.lang.reflect.Method m)
        Description copied from interface: CTypeI
        Resolves the type arguments of the specified method in the context of this type.
        Parameters:
        m - the method
        Returns:
        an array of resolved type arguments
      • resolveExtend

        public CTypeI<java.lang.Object> resolveExtend​(CTypeI<java.lang.Object> inf)
        Description copied from interface: CTypeI
        Resolves the extended type for the specified interface in the context of this type.
        Parameters:
        inf - the interface type
        Returns:
        the resolved extended type
      • resolveTypeField

        public CTypeI<java.lang.Object> resolveTypeField​(java.lang.reflect.Field f)
        Description copied from interface: CTypeI
        Resolves the type of the specified field in the context of this type.
        Parameters:
        f - the field
        Returns:
        the resolved field type
      • isBoxedPrimitive

        public boolean isBoxedPrimitive()
        Description copied from interface: CTypeI
        Checks if this type represents a boxed primitive.
        Returns:
        true if this is a boxed primitive, false otherwise
      • toPrimitive

        public CTypeI<T> toPrimitive()
        Description copied from interface: CTypeI
        Converts this type to its primitive equivalent if it's a boxed primitive.
        Returns:
        the primitive type
      • unbox

        public CTypeI<T> unbox()
        Description copied from interface: CTypeI
        Unboxes this type if it's a boxed primitive.
        Returns:
        the unboxed type
      • getParameters

        public CTypeI<java.lang.Object>[] getParameters()
        Description copied from interface: CTypeI
        Gets the type parameters for this type.
        Returns:
        an array of type parameters
      • getParent

        public CType<java.lang.Object> getParent()
        Description copied from interface: CTypeI
        Gets the parent type of this type.
        Returns:
        the parent type, or null if none exists
      • tryToBox

        public CTypeI<T> tryToBox()
        Description copied from interface: CTypeI
        Attempts to box this type if it's a primitive.
        Returns:
        the boxed type, or this type if not primitive
      • declareCode

        public java.lang.String declareCode()
        Description copied from interface: CTypeI
        Gets the declaration code for this type, including annotations and type parameters.
        Specified by:
        declareCode in interface CTypeI<T>
        Overrides:
        declareCode in class CType<T>
        Returns:
        the declaration code