Package spoon.reflect.declaration
Interface CtShadowable
- All Known Subinterfaces:
CtAnnotation<A>,CtAnnotationMethod<T>,CtAnnotationType<T>,CtArrayTypeReference<T>,CtClass<T>,CtConstructor<T>,CtEnum<T>,CtEnumValue<T>,CtField<T>,CtInterface<T>,CtIntersectionTypeReference<T>,CtMethod<T>,CtPackage,CtParameter<T>,CtRecord,CtRecordComponent,CtType<T>,CtTypeParameter,CtTypeParameterReference,CtTypeReference<T>,CtWildcardReference
- All Known Implementing Classes:
CtAnnotationImpl,CtAnnotationMethodImpl,CtAnnotationTypeImpl,CtArrayTypeReferenceImpl,CtClassImpl,CtConstructorImpl,CtEnumImpl,CtEnumValueImpl,CtFieldImpl,CtInterfaceImpl,CtIntersectionTypeReferenceImpl,CtMethodImpl,CtModelImpl.CtRootPackage,CtPackageImpl,CtParameterImpl,CtRecordComponentImpl,CtRecordImpl,CtTypeImpl,CtTypeParameterImpl,CtTypeParameterReferenceImpl,CtTypeReferenceImpl,CtWildcardReferenceImpl,InvisibleArrayConstructorImpl
public interface CtShadowable
A shadow element is an element that is in the Spoon model, but does not exist in the actual source code.
The goal of shadow elements is to simplify transformations.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisShadow()When an element isn't present in the factory (created in another factory), this element is considered as "shadow".<E extends CtShadowable>
EsetShadow(boolean isShadow)Marks an element as shadow.
-
Method Details
-
isShadow
boolean isShadow()When an element isn't present in the factory (created in another factory), this element is considered as "shadow". e.g., a shadow element can be a CtType of java.lang.Class built when we callCtTypeReference.getTypeDeclaration()on a reference of java.lang.Class.- Returns:
- true if the element is a shadow element, otherwise false.
-
setShadow
Marks an element as shadow. To know what is a shadow element, see the javadoc ofisShadow().
-