public abstract class AbstractJavaEntity extends AbstractBaseJavaEntity implements JavaModel
Modifier and Type | Field and Description |
---|---|
private JavaClass |
declaringClass |
private java.util.List<java.lang.String> |
modifiers |
private java.lang.String |
name |
Constructor and Description |
---|
AbstractJavaEntity() |
Modifier and Type | Method and Description |
---|---|
JavaClass |
getDeclaringClass()
Not every entity has a parentClass, but AnnotationFieldRef requires access to it.
|
java.util.List<java.lang.String> |
getModifiers()
Return list of modifiers as Strings.
|
java.lang.String |
getName() |
boolean |
isAbstract()
Equivalent of
Modifier.isAbstract(int) |
boolean |
isFinal()
Equivalent of
Modifier.isFinal(int) |
private boolean |
isModifierPresent(java.lang.String modifier)
Returns
true if one of the modifiers matches the modifier |
boolean |
isNative()
Equivalent of
Modifier.isNative(int) |
boolean |
isPrivate()
Equivalent of
Modifier.isPrivate(int) |
boolean |
isProtected()
Equivalent of
Modifier.isProtected(int) |
boolean |
isPublic()
Equivalent of
Modifier.isPublic(int) |
boolean |
isStatic()
Equivalent of
Modifier.isStatic(int) |
boolean |
isStrictfp()
Equivalent of
Modifier.isStrict(int) |
boolean |
isSynchronized()
Equivalent of
Modifier.isSynchronized(int) |
boolean |
isTransient()
Equivalent of
Modifier.isTransient(int) |
boolean |
isVolatile()
Equivalent of
Modifier.isVolatile(int) |
void |
setDeclaringClass(JavaClass declaringClass) |
void |
setModifiers(java.util.List<java.lang.String> modifiers) |
void |
setName(java.lang.String name) |
getAnnotations, getComment, getNamedParameter, getSource, getTagByName, getTags, getTagsByName, setAnnotations, setComment, setSource, setTags
getLineNumber, getModelWriter, setLineNumber, setModelWriterFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCodeBlock, getLineNumber
private java.util.List<java.lang.String> modifiers
private JavaClass declaringClass
private java.lang.String name
public java.util.List<java.lang.String> getModifiers()
null
public void setModifiers(java.util.List<java.lang.String> modifiers)
public boolean isAbstract()
Modifier.isAbstract(int)
true
if entity is abstract, otherwise false
public boolean isPublic()
Modifier.isPublic(int)
true
if entity is public, otherwise false
public boolean isPrivate()
Modifier.isPrivate(int)
true
if entity is private, otherwise false
public boolean isProtected()
Modifier.isProtected(int)
true
if entity is protected, otherwise false
public boolean isStatic()
Modifier.isStatic(int)
true
if entity is static, otherwise false
public boolean isFinal()
Modifier.isFinal(int)
true
if entity is final, otherwise false
public boolean isSynchronized()
Modifier.isSynchronized(int)
true
if entity is sunchronized, otherwise false
public boolean isTransient()
Modifier.isTransient(int)
true
if entity is transient, otherwise false
public boolean isVolatile()
Modifier.isVolatile(int)
true
if entity is volatile, otherwise false
public boolean isNative()
Modifier.isNative(int)
true
if entity is native, otherwise false
public boolean isStrictfp()
Modifier.isStrict(int)
true
if entity is strictfp, otherwise false
private boolean isModifierPresent(java.lang.String modifier)
true
if one of the modifiers matches the modifier
modifier
- the modifiertrue
if the modifier is present, otherwise false
public void setDeclaringClass(JavaClass declaringClass)
public JavaClass getDeclaringClass()
getDeclaringClass
in class AbstractBaseJavaEntity
public java.lang.String getName()
public void setName(java.lang.String name)