com.ibm.wala.classLoader
Class FieldImpl

java.lang.Object
  extended by com.ibm.wala.classLoader.FieldImpl
All Implemented Interfaces:
IField, IMember, IClassHierarchyDweller

public final class FieldImpl
extends java.lang.Object
implements IField

Implementation of a canonical field reference. TODO: canonicalize these? TODO: don't cache fieldType here .. move to class?


Constructor Summary
FieldImpl(IClass declaringClass, FieldReference canonicalRef, int accessFlags, java.util.Collection<Annotation> annotations)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.Collection<Annotation> getAnnotations()
           
 IClassHierarchy getClassHierarchy()
           
 IClass getDeclaringClass()
          Return the object that represents the declaring class for this member.
 TypeReference getFieldTypeReference()
           
 Atom getName()
           
 FieldReference getReference()
           
 int hashCode()
           
 boolean isFinal()
          Is this field final?
 boolean isPrivate()
           
 boolean isProtected()
           
 boolean isPublic()
           
 boolean isStatic()
          Is this member static?
 boolean isVolatile()
          Is this member volatile?
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldImpl

public FieldImpl(IClass declaringClass,
                 FieldReference canonicalRef,
                 int accessFlags,
                 java.util.Collection<Annotation> annotations)
Method Detail

getDeclaringClass

public IClass getDeclaringClass()
Description copied from interface: IMember
Return the object that represents the declaring class for this member.

Specified by:
getDeclaringClass in interface IMember
Returns:
the object that represents the declaring class for this member.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getReference

public FieldReference getReference()
Specified by:
getReference in interface IField
Returns:
canonical FieldReference representing this field

getName

public Atom getName()
Specified by:
getName in interface IMember
Returns:
the name of this member

getFieldTypeReference

public TypeReference getFieldTypeReference()
Specified by:
getFieldTypeReference in interface IField
Returns:
the canonical TypeReference of the declared type of the field

isStatic

public boolean isStatic()
Description copied from interface: IMember
Is this member static?

Specified by:
isStatic in interface IField
Specified by:
isStatic in interface IMember

isFinal

public boolean isFinal()
Description copied from interface: IField
Is this field final?

Specified by:
isFinal in interface IField

isPrivate

public boolean isPrivate()
Specified by:
isPrivate in interface IField

isProtected

public boolean isProtected()
Specified by:
isProtected in interface IField

isPublic

public boolean isPublic()
Specified by:
isPublic in interface IField

isVolatile

public boolean isVolatile()
Description copied from interface: IField
Is this member volatile?

Specified by:
isVolatile in interface IField

getClassHierarchy

public IClassHierarchy getClassHierarchy()
Specified by:
getClassHierarchy in interface IClassHierarchyDweller

getAnnotations

public java.util.Collection<Annotation> getAnnotations()