soot
Class SootField

java.lang.Object
  extended by soot.tagkit.AbstractHost
      extended by soot.SootField
All Implemented Interfaces:
ClassMember, PaddleField, SparkField, Host, Numberable

public class SootField
extends AbstractHost
implements ClassMember, SparkField, Numberable, PaddleField

Soot representation of a Java field. Can be declared to belong to a SootClass.


Constructor Summary
SootField(String name, Type type)
          Constructs a Soot field with the given name, type and no modifiers.
SootField(String name, Type type, int modifiers)
          Constructs a Soot field with the given name, type and modifiers.
 
Method Summary
 int equivHashCode()
           
 String getDeclaration()
           
 SootClass getDeclaringClass()
          Returns the SootClass declaring this one.
 int getModifiers()
          Returns modifiers of this class member.
 String getName()
           
 int getNumber()
           
 String getSignature()
           
static String getSignature(SootClass cl, String name, Type type)
           
 String getSubSignature()
           
 Type getType()
           
 boolean isDeclared()
          Returns true when some SootClass object declares this object.
 boolean isFinal()
          Convenience method returning true if this field is final.
 boolean isPhantom()
          Returns true when this object is from a phantom class.
 boolean isPrivate()
          Convenience method returning true if this field is private.
 boolean isProtected()
          Convenience method returning true if this field is protected.
 boolean isPublic()
          Convenience method returning true if this field is public.
 boolean isStatic()
          Convenience method returning true if this field is static.
 SootFieldRef makeRef()
           
 void setModifiers(int modifiers)
          Sets modifiers of this class member.
 void setName(String name)
           
 void setNumber(int number)
           
 void setPhantom(boolean value)
           
 void setType(Type t)
           
 String toString()
           
 
Methods inherited from class soot.tagkit.AbstractHost
addAllTagsOf, addTag, getTag, getTags, hasTag, removeAllTags, removeTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SootField

public SootField(String name,
                 Type type,
                 int modifiers)
Constructs a Soot field with the given name, type and modifiers.


SootField

public SootField(String name,
                 Type type)
Constructs a Soot field with the given name, type and no modifiers.

Method Detail

equivHashCode

public int equivHashCode()

getName

public String getName()

getSignature

public String getSignature()

getSignature

public static String getSignature(SootClass cl,
                                  String name,
                                  Type type)

getSubSignature

public String getSubSignature()

getDeclaringClass

public SootClass getDeclaringClass()
Description copied from interface: ClassMember
Returns the SootClass declaring this one.

Specified by:
getDeclaringClass in interface ClassMember

isPhantom

public boolean isPhantom()
Description copied from interface: ClassMember
Returns true when this object is from a phantom class.

Specified by:
isPhantom in interface ClassMember

setPhantom

public void setPhantom(boolean value)

isDeclared

public boolean isDeclared()
Description copied from interface: ClassMember
Returns true when some SootClass object declares this object.

Specified by:
isDeclared in interface ClassMember

setName

public void setName(String name)

getType

public Type getType()
Specified by:
getType in interface SparkField

setType

public void setType(Type t)

isPublic

public boolean isPublic()
Convenience method returning true if this field is public.

Specified by:
isPublic in interface ClassMember

isProtected

public boolean isProtected()
Convenience method returning true if this field is protected.

Specified by:
isProtected in interface ClassMember

isPrivate

public boolean isPrivate()
Convenience method returning true if this field is private.

Specified by:
isPrivate in interface ClassMember

isStatic

public boolean isStatic()
Convenience method returning true if this field is static.

Specified by:
isStatic in interface ClassMember

isFinal

public boolean isFinal()
Convenience method returning true if this field is final.


setModifiers

public void setModifiers(int modifiers)
Description copied from interface: ClassMember
Sets modifiers of this class member.

Specified by:
setModifiers in interface ClassMember

getModifiers

public int getModifiers()
Description copied from interface: ClassMember
Returns modifiers of this class member.

Specified by:
getModifiers in interface ClassMember

toString

public String toString()
Overrides:
toString in class Object

getDeclaration

public String getDeclaration()

getNumber

public final int getNumber()
Specified by:
getNumber in interface Numberable

setNumber

public final void setNumber(int number)
Specified by:
setNumber in interface Numberable

makeRef

public SootFieldRef makeRef()