Package edu.umd.cs.findbugs.ba
Class AbstractClassMember
- java.lang.Object
-
- edu.umd.cs.findbugs.ba.AbstractClassMember
-
- All Implemented Interfaces:
AccessibleEntity
,ClassMember
,FieldOrMethodName
,java.io.Serializable
- Direct Known Subclasses:
AbstractField
,AbstractMethod
public abstract class AbstractClassMember extends java.lang.Object implements ClassMember
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractClassMember(java.lang.String className, java.lang.String name, java.lang.String signature, int accessFlags)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
getAccessFlags()
Get the entity's access flags.ClassDescriptor
getClassDescriptor()
Get the ClassDescriptor representing the class (if entity is a class) or the class containing the entity (if a field or method).java.lang.String
getClassName()
Get the full (dotted) name of the class (if the object represents a class) or the class the entity is defined in (if a field or method).java.lang.String
getName()
Get the name of the field/method.java.lang.String
getPackageName()
Get the (dotted) name of the package in which the entity is defined.java.lang.String
getSignature()
Get the signature representing the field/method's type.int
hashCode()
boolean
isFinal()
Is the entity final?boolean
isPrivate()
Is the entity private?boolean
isProtected()
Is the entity protected?boolean
isPublic()
Is the entity public?boolean
isReferenceType()
boolean
isResolved()
Did we find a declaration of this entity?boolean
isStatic()
Is the entity static?java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface edu.umd.cs.findbugs.ba.AccessibleEntity
isDeprecated, isSynthetic
-
Methods inherited from interface edu.umd.cs.findbugs.ba.ClassMember
getSourceSignature
-
-
-
-
Constructor Detail
-
AbstractClassMember
protected AbstractClassMember(@DottedClassName java.lang.String className, java.lang.String name, java.lang.String signature, int accessFlags)
-
-
Method Detail
-
getClassName
@DottedClassName public java.lang.String getClassName()
Description copied from interface:ClassMember
Get the full (dotted) name of the class (if the object represents a class) or the class the entity is defined in (if a field or method).- Specified by:
getClassName
in interfaceClassMember
-
getClassDescriptor
public ClassDescriptor getClassDescriptor()
Description copied from interface:AccessibleEntity
Get the ClassDescriptor representing the class (if entity is a class) or the class containing the entity (if a field or method).- Specified by:
getClassDescriptor
in interfaceAccessibleEntity
- Specified by:
getClassDescriptor
in interfaceFieldOrMethodName
- Returns:
- a ClassDescriptor for the field/method's class
-
getName
public java.lang.String getName()
Description copied from interface:ClassMember
Get the name of the field/method.- Specified by:
getName
in interfaceClassMember
- Specified by:
getName
in interfaceFieldOrMethodName
- Returns:
- Returns the field/method name
-
getPackageName
@DottedClassName public java.lang.String getPackageName()
Description copied from interface:ClassMember
Get the (dotted) name of the package in which the entity is defined.- Specified by:
getPackageName
in interfaceClassMember
-
getSignature
public java.lang.String getSignature()
Description copied from interface:ClassMember
Get the signature representing the field/method's type.- Specified by:
getSignature
in interfaceClassMember
- Specified by:
getSignature
in interfaceFieldOrMethodName
- Returns:
- Returns the field/method signature
-
isReferenceType
public boolean isReferenceType()
-
getAccessFlags
public int getAccessFlags()
Description copied from interface:AccessibleEntity
Get the entity's access flags.- Specified by:
getAccessFlags
in interfaceAccessibleEntity
-
isStatic
public boolean isStatic()
Description copied from interface:AccessibleEntity
Is the entity static?- Specified by:
isStatic
in interfaceAccessibleEntity
- Specified by:
isStatic
in interfaceFieldOrMethodName
- Returns:
- Returns true if field/method is static, false if not
-
isFinal
public boolean isFinal()
Description copied from interface:AccessibleEntity
Is the entity final?- Specified by:
isFinal
in interfaceAccessibleEntity
-
isPublic
public boolean isPublic()
Description copied from interface:AccessibleEntity
Is the entity public?- Specified by:
isPublic
in interfaceAccessibleEntity
-
isProtected
public boolean isProtected()
Description copied from interface:AccessibleEntity
Is the entity protected?- Specified by:
isProtected
in interfaceAccessibleEntity
-
isPrivate
public boolean isPrivate()
Description copied from interface:AccessibleEntity
Is the entity private?- Specified by:
isPrivate
in interfaceAccessibleEntity
-
isResolved
public boolean isResolved()
Description copied from interface:ClassMember
Did we find a declaration of this entity?- Specified by:
isResolved
in interfaceClassMember
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-