Package spoon.reflect.declaration
Interface CtEnumValue<T>
- Type Parameters:
T- the type of the enum, hence equal to the type of getParent().
- All Superinterfaces:
Cloneable,CtElement,CtField<T>,CtModifiable,CtNamedElement,CtQueryable,CtRHSReceiver<T>,CtShadowable,CtTypedElement<T>,CtTypeMember,CtVariable<T>,CtVisitable,FactoryAccessor,Serializable,SourcePositionHolder
- All Known Implementing Classes:
CtEnumValueImpl
Corresponds to one enum value specified in an enumeration.
If the enum value implicitly calls a constructor (see example below),
it is stored in the default expression of the field as CtConstructorCall,
class enum {
ENUM_VALUE("default expression.");
}
-
Field Summary
Fields inherited from interface spoon.reflect.declaration.CtField
FIELD_SEPARATOR -
Method Summary
Modifier and TypeMethodDescriptionclone()Clone the element which calls this method in a new object.<U extends CtRHSReceiver<T>>
UsetAssignment(CtExpression<T> assignment)Sets the right-hand side expression (RHS) of the "=" operator.Methods inherited from interface spoon.reflect.declaration.CtElement
addAnnotation, addComment, asIterable, delete, descendantIterator, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hasParent, isImplicit, isParentInitialized, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, updateAllParentsBelowMethods inherited from interface spoon.reflect.declaration.CtField
getAssignment, getReferenceMethods inherited from interface spoon.reflect.declaration.CtModifiable
addModifier, getExtendedModifiers, getModifiers, getVisibility, hasModifier, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, removeModifier, setExtendedModifiers, setModifiers, setVisibilityMethods inherited from interface spoon.reflect.declaration.CtNamedElement
getSimpleName, setSimpleNameMethods inherited from interface spoon.reflect.visitor.chain.CtQueryable
filterChildren, map, mapMethods inherited from interface spoon.reflect.declaration.CtShadowable
isShadow, setShadowMethods inherited from interface spoon.reflect.declaration.CtTypedElement
getType, setTypeMethods inherited from interface spoon.reflect.declaration.CtTypeMember
getDeclaringType, getTopLevelTypeMethods inherited from interface spoon.reflect.declaration.CtVariable
getDefaultExpression, isPartOfJointDeclaration, setDefaultExpressionMethods inherited from interface spoon.reflect.visitor.CtVisitable
acceptMethods inherited from interface spoon.processing.FactoryAccessor
getFactory, setFactory
-
Method Details
-
clone
CtEnumValue clone()Description copied from interface:CtElementClone the element which calls this method in a new object. Note that that references are kept as is, and thus, so if you clone whole classes or methods, some parts of the cloned element (eg executable references) may still point to the initial element. In this case, consider using methodsRefactoring.copyType(CtType)andRefactoring.copyMethod(CtMethod)instead which does additional work beyond cloning. -
setAssignment
Description copied from interface:CtRHSReceiverSets the right-hand side expression (RHS) of the "=" operator.- Specified by:
setAssignmentin interfaceCtField<T>- Specified by:
setAssignmentin interfaceCtRHSReceiver<T>
-