Interface CtTypeMember

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

public interface CtTypeMember extends CtModifiable, CtNamedElement
This interface represents a member of a class (field, method, nested class or static/instance initializer).
  • Method Details

    • getDeclaringType

      CtType<?> getDeclaringType()
      Gets the type that declares this class member.
      Returns:
      declaring class
    • getTopLevelType

      <T> CtType<T> getTopLevelType()
      Returns the top level type declaring this type if an inner type or type member. If this is already a top-level type, then returns itself.