Class AbstractJavaEntity

All Implemented Interfaces:
JavaModel, Serializable
Direct Known Subclasses:
AbstractInheritableJavaEntity, DefaultJavaField

public abstract class AbstractJavaEntity extends AbstractBaseJavaEntity implements JavaModel
See Also:
  • Field Details

  • Constructor Details

    • AbstractJavaEntity

      public AbstractJavaEntity()
  • Method Details

    • getModifiers

      public List<String> getModifiers()
      Return list of modifiers as Strings. (public, private, protected, final, abstract, static)
      Returns:
      a list of modifiers, never null
    • setModifiers

      public void setModifiers(List<String> modifiers)
    • isAbstract

      public boolean isAbstract()
      Returns:
      true if entity is abstract, otherwise false
    • isPublic

      public boolean isPublic()
      Returns:
      true if entity is public, otherwise false
    • isPrivate

      public boolean isPrivate()
      Returns:
      true if entity is private, otherwise false
    • isProtected

      public boolean isProtected()
      Returns:
      true if entity is protected, otherwise false
    • isStatic

      public boolean isStatic()
      Returns:
      true if entity is static, otherwise false
    • isFinal

      public boolean isFinal()
      Equivalent of Modifier.isFinal(int)
      Returns:
      true if entity is final, otherwise false
    • isSynchronized

      public boolean isSynchronized()
      Returns:
      true if entity is sunchronized, otherwise false
    • isTransient

      public boolean isTransient()
      Returns:
      true if entity is transient, otherwise false
    • isVolatile

      public boolean isVolatile()
      Returns:
      true if entity is volatile, otherwise false
      Since:
      1.4
    • isNative

      public boolean isNative()
      Returns:
      true if entity is native, otherwise false
      Since:
      1.4
    • isStrictfp

      public boolean isStrictfp()
      Returns:
      true if entity is strictfp, otherwise false
      Since:
      1.4
    • isModifierPresent

      private boolean isModifierPresent(String modifier)
      Returns true if one of the modifiers matches the modifier
      Parameters:
      modifier - the modifier
      Returns:
      true if the modifier is present, otherwise false
    • setDeclaringClass

      public void setDeclaringClass(JavaClass declaringClass)
    • getDeclaringClass

      public JavaClass getDeclaringClass()
      Not every entity has a parentClass, but AnnotationFieldRef requires access to it. When used with JavaClass, don't confuse this with getSuperClass()
      Overrides:
      getDeclaringClass in class AbstractBaseJavaEntity
      Returns:
      the surrounding class
    • getName

      public String getName()
    • setName

      public void setName(String name)