Class AnnotableAndModifiableExtension
java.lang.Object
org.emftext.language.java.extensions.modifiers.AnnotableAndModifiableExtension
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddModifier(AnnotableAndModifiable me, Modifier newModifier) Adds the given type of modifier to this element.static EList<AnnotationInstance>Returns an unmodifiable list of the annotations that apply to this element.Returns an unmodifiable list of the modifiers that apply to this element.static booleanhasModifier(AnnotableAndModifiable me, Class<?> type) Checks whether this element has an modifier of the given type.static booleanisHidden(AnnotableAndModifiable me, Commentable context) static booleanstatic booleanstatic booleanstatic booleanReturnstrueif this element is static (either by an explicit modifierstaticor because this element is part of an interface).static voidSets the visibility of this element toprivate.static voidSets the visibility of this element toprotected.static voidSets the visibility of this element topublic.static voidRemoves all modifiers from this element.static voidremoveModifier(AnnotableAndModifiable me, Class<?> modifierType) Removes the given type of modifier from this element.
-
Constructor Details
-
AnnotableAndModifiableExtension
public AnnotableAndModifiableExtension()
-
-
Method Details
-
makePrivate
Sets the visibility of this element toprivate.- Parameters:
me- this element.
-
makePublic
Sets the visibility of this element topublic.- Parameters:
me- this element.
-
makeProtected
Sets the visibility of this element toprotected.- Parameters:
me- this element.
-
removeAllModifiers
Removes all modifiers from this element.- Parameters:
me- this element.
-
getModifiers
Returns an unmodifiable list of the modifiers that apply to this element.- Parameters:
me- this element.- Returns:
- the modifiers.
-
getAnnotationInstances
Returns an unmodifiable list of the annotations that apply to this element.- Parameters:
me- this element.- Returns:
- the annotations.
-
addModifier
Adds the given type of modifier to this element. This method does not check for duplicate modifiers!- Parameters:
me- this element.newModifier- the modifier to add
-
removeModifier
Removes the given type of modifier from this element.- Parameters:
me- this element.modifierType- type of the modifier to remove.
-
isPublic
-
isPrivate
-
isProtected
-
hasModifier
Checks whether this element has an modifier of the given type.- Parameters:
me- this element.type- type of the modifier.- Returns:
- true or false.
-
isStatic
Returnstrueif this element is static (either by an explicit modifierstaticor because this element is part of an interface).- Parameters:
me- this element.- Returns:
- true if this element is static. false otherwise.
-
isHidden
-