Package spoon.support.reflect
Class CtExtendedModifier
- java.lang.Object
-
- spoon.support.reflect.CtExtendedModifier
-
- All Implemented Interfaces:
Serializable
,SourcePositionHolder
public class CtExtendedModifier extends Object implements SourcePositionHolder, Serializable
Represents a modifier (eg "public"). When a modifier is "implicit", it does not appear in the source code (eg public for interface methods) ModifierKind in kept for sake of full backward-compatibility.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CtExtendedModifier(ModifierKind kind)
CtExtendedModifier(ModifierKind kind, boolean implicit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
ModifierKind
getKind()
ElementSourceFragment
getOriginalSourceFragment()
Returns the original source code (maybe different from toString() if a transformation has been applied).SourcePosition
getPosition()
If the element comes from a Java source file (hence has not created during transformation), returns the position in the original source fileint
hashCode()
boolean
isImplicit()
void
setImplicit(boolean implicit)
void
setKind(ModifierKind kind)
void
setPosition(SourcePosition position)
-
-
-
Constructor Detail
-
CtExtendedModifier
public CtExtendedModifier(ModifierKind kind)
-
CtExtendedModifier
public CtExtendedModifier(ModifierKind kind, boolean implicit)
-
-
Method Detail
-
isImplicit
public boolean isImplicit()
-
setImplicit
public void setImplicit(boolean implicit)
-
getKind
public ModifierKind getKind()
-
setKind
public void setKind(ModifierKind kind)
-
getPosition
public SourcePosition getPosition()
Description copied from interface:SourcePositionHolder
If the element comes from a Java source file (hence has not created during transformation), returns the position in the original source file- Specified by:
getPosition
in interfaceSourcePositionHolder
-
setPosition
public void setPosition(SourcePosition position)
-
getOriginalSourceFragment
public ElementSourceFragment getOriginalSourceFragment()
Description copied from interface:SourcePositionHolder
Returns the original source code (maybe different from toString() if a transformation has been applied). Warning: this is a advanced method which cannot be considered as part of the stable API- Specified by:
getOriginalSourceFragment
in interfaceSourcePositionHolder
-
-