Interface CtFormalTypeDeclarer

All Superinterfaces:
Cloneable, CtElement, CtModifiable, CtNamedElement, CtQueryable, CtTypeMember, CtVisitable, FactoryAccessor, Serializable, SourcePositionHolder
All Known Subinterfaces:
CtAnnotationMethod<T>, CtAnnotationType<T>, CtClass<T>, CtConstructor<T>, CtEnum<T>, CtInterface<T>, CtMethod<T>, CtRecord, CtType<T>, CtTypeParameter
All Known Implementing Classes:
CtAnnotationMethodImpl, CtAnnotationTypeImpl, CtClassImpl, CtConstructorImpl, CtEnumImpl, CtInterfaceImpl, CtMethodImpl, CtRecordImpl, CtTypeImpl, CtTypeParameterImpl, InvisibleArrayConstructorImpl

public interface CtFormalTypeDeclarer extends CtTypeMember
This abstract element defines a declaration that accepts formal type parameters (aka generics), such as a CtType (class A<E>), CtMethod or CtConstructor.
  • Method Details

    • getFormalCtTypeParameters

      List<CtTypeParameter> getFormalCtTypeParameters()
      Returns the formal type parameters of this generic element.
    • setFormalCtTypeParameters

      <T extends CtFormalTypeDeclarer> T setFormalCtTypeParameters(List<CtTypeParameter> formalTypeParameters)
      Sets the type parameters of this generic element.
    • addFormalCtTypeParameter

      <T extends CtFormalTypeDeclarer> T addFormalCtTypeParameter(CtTypeParameter formalTypeParameter)
      Add a type parameter to this generic element.
    • addFormalCtTypeParameterAt

      <T extends CtFormalTypeDeclarer> T addFormalCtTypeParameterAt(int position, CtTypeParameter formalTypeParameter)
      Add a type parameter at a specific position.
      Parameters:
      position - Position to insert the type parameter at
      formalTypeParameter - The type parameter to insert
      Returns:
      The receiver
    • removeFormalCtTypeParameter

      boolean removeFormalCtTypeParameter(CtTypeParameter formalTypeParameter)
      Removes a type parameters from this generic element.