Package com.thoughtworks.qdox.model.impl
Class AbstractJavaEntity
java.lang.Object
com.thoughtworks.qdox.model.impl.AbstractJavaModel
com.thoughtworks.qdox.model.impl.AbstractBaseJavaEntity
com.thoughtworks.qdox.model.impl.AbstractJavaEntity
- All Implemented Interfaces:
JavaModel,Serializable
- Direct Known Subclasses:
AbstractInheritableJavaEntity,DefaultJavaField
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionNot every entity has a parentClass, but AnnotationFieldRef requires access to it.Return list of modifiers as Strings.getName()booleanEquivalent ofModifier.isAbstract(int)booleanisFinal()Equivalent ofModifier.isFinal(int)private booleanisModifierPresent(String modifier) Returnstrueif one of the modifiers matches themodifierbooleanisNative()Equivalent ofModifier.isNative(int)booleanEquivalent ofModifier.isPrivate(int)booleanEquivalent ofModifier.isProtected(int)booleanisPublic()Equivalent ofModifier.isPublic(int)booleanisStatic()Equivalent ofModifier.isStatic(int)booleanEquivalent ofModifier.isStrict(int)booleanEquivalent ofModifier.isSynchronized(int)booleanEquivalent ofModifier.isTransient(int)booleanEquivalent ofModifier.isVolatile(int)voidsetDeclaringClass(JavaClass declaringClass) voidsetModifiers(List<String> modifiers) voidMethods inherited from class com.thoughtworks.qdox.model.impl.AbstractBaseJavaEntity
getAnnotations, getComment, getNamedParameter, getSource, getTagByName, getTags, getTagsByName, setAnnotations, setComment, setSource, setTagsMethods inherited from class com.thoughtworks.qdox.model.impl.AbstractJavaModel
getLineNumber, getModelWriter, setLineNumber, setModelWriterFactoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.thoughtworks.qdox.model.JavaModel
getCodeBlock, getLineNumber
-
Field Details
-
modifiers
-
declaringClass
-
name
-
-
Constructor Details
-
AbstractJavaEntity
public AbstractJavaEntity()
-
-
Method Details
-
getModifiers
Return list of modifiers as Strings. (public, private, protected, final, abstract, static)- Returns:
- a list of modifiers, never
null
-
setModifiers
-
isAbstract
public boolean isAbstract()Equivalent ofModifier.isAbstract(int)- Returns:
trueif entity is abstract, otherwisefalse
-
isPublic
public boolean isPublic()Equivalent ofModifier.isPublic(int)- Returns:
trueif entity is public, otherwisefalse
-
isPrivate
public boolean isPrivate()Equivalent ofModifier.isPrivate(int)- Returns:
trueif entity is private, otherwisefalse
-
isProtected
public boolean isProtected()Equivalent ofModifier.isProtected(int)- Returns:
trueif entity is protected, otherwisefalse
-
isStatic
public boolean isStatic()Equivalent ofModifier.isStatic(int)- Returns:
trueif entity is static, otherwisefalse
-
isFinal
public boolean isFinal()Equivalent ofModifier.isFinal(int)- Returns:
trueif entity is final, otherwisefalse
-
isSynchronized
public boolean isSynchronized()Equivalent ofModifier.isSynchronized(int)- Returns:
trueif entity is sunchronized, otherwisefalse
-
isTransient
public boolean isTransient()Equivalent ofModifier.isTransient(int)- Returns:
trueif entity is transient, otherwisefalse
-
isVolatile
public boolean isVolatile()Equivalent ofModifier.isVolatile(int)- Returns:
trueif entity is volatile, otherwisefalse- Since:
- 1.4
-
isNative
public boolean isNative()Equivalent ofModifier.isNative(int)- Returns:
trueif entity is native, otherwisefalse- Since:
- 1.4
-
isStrictfp
public boolean isStrictfp()Equivalent ofModifier.isStrict(int)- Returns:
trueif entity is strictfp, otherwisefalse- Since:
- 1.4
-
isModifierPresent
Returnstrueif one of the modifiers matches themodifier- Parameters:
modifier- the modifier- Returns:
trueif the modifier is present, otherwisefalse
-
setDeclaringClass
-
getDeclaringClass
Not every entity has a parentClass, but AnnotationFieldRef requires access to it. When used with JavaClass, don't confuse this with getSuperClass()- Overrides:
getDeclaringClassin classAbstractBaseJavaEntity- Returns:
- the surrounding class
-
getName
-
setName
-