Package soot
Class SootField
- java.lang.Object
-
- soot.tagkit.AbstractHost
-
- soot.SootField
-
- All Implemented Interfaces:
ClassMember
,PaddleField
,SparkField
,Host
public class SootField extends AbstractHost implements ClassMember, SparkField, PaddleField
Soot representation of a Java field. Can be declared to belong to a SootClass.
-
-
Field Summary
Fields Modifier and Type Field Description protected SootClass
declaringClass
protected boolean
isDeclared
protected boolean
isPhantom
protected int
modifiers
protected String
name
protected String
sig
protected String
subSig
protected Type
type
-
Fields inherited from class soot.tagkit.AbstractHost
col, line, mTagList
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
equivHashCode()
String
getDeclaration()
SootClass
getDeclaringClass()
Returns the SootClass declaring this one.int
getModifiers()
Returns modifiers of this class member.String
getName()
String
getSignature()
static String
getSignature(SootClass cl, String subSignature)
static String
getSignature(SootClass cl, String name, Type type)
String
getSubSignature()
protected static String
getSubSignature(String name, Type type)
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
setDeclared(boolean isDeclared)
void
setDeclaringClass(SootClass sc)
void
setModifiers(int modifiers)
Sets modifiers of this class member.void
setName(String name)
void
setPhantom(boolean value)
Sets the phantom flagvoid
setType(Type t)
String
toString()
-
Methods inherited from class soot.tagkit.AbstractHost
addAllTagsOf, addTag, getJavaSourceStartColumnNumber, getJavaSourceStartLineNumber, getTag, getTags, hasTag, removeAllTags, removeTag
-
-
-
-
Field Detail
-
name
protected String name
-
type
protected Type type
-
modifiers
protected int modifiers
-
isDeclared
protected boolean isDeclared
-
declaringClass
protected SootClass declaringClass
-
isPhantom
protected boolean isPhantom
-
sig
protected volatile String sig
-
subSig
protected volatile String subSig
-
-
Method Detail
-
equivHashCode
public int equivHashCode()
-
getSignature
public String getSignature()
-
getSubSignature
public String getSubSignature()
-
getDeclaringClass
public SootClass getDeclaringClass()
Description copied from interface:ClassMember
Returns the SootClass declaring this one.- Specified by:
getDeclaringClass
in interfaceClassMember
-
setDeclaringClass
public void setDeclaringClass(SootClass sc)
-
isPhantom
public boolean isPhantom()
Description copied from interface:ClassMember
Returns true when this object is from a phantom class.- Specified by:
isPhantom
in interfaceClassMember
-
setPhantom
public void setPhantom(boolean value)
Description copied from interface:ClassMember
Sets the phantom flag- Specified by:
setPhantom
in interfaceClassMember
-
isDeclared
public boolean isDeclared()
Description copied from interface:ClassMember
Returns true when some SootClass object declares this object.- Specified by:
isDeclared
in interfaceClassMember
-
setDeclared
public void setDeclared(boolean isDeclared)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getType
public Type getType()
- Specified by:
getType
in interfaceSparkField
-
setType
public void setType(Type t)
-
isPublic
public boolean isPublic()
Convenience method returning true if this field is public.- Specified by:
isPublic
in interfaceClassMember
-
isProtected
public boolean isProtected()
Convenience method returning true if this field is protected.- Specified by:
isProtected
in interfaceClassMember
-
isPrivate
public boolean isPrivate()
Convenience method returning true if this field is private.- Specified by:
isPrivate
in interfaceClassMember
-
isStatic
public boolean isStatic()
Convenience method returning true if this field is static.- Specified by:
isStatic
in interfaceClassMember
-
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 interfaceClassMember
-
getModifiers
public int getModifiers()
Description copied from interface:ClassMember
Returns modifiers of this class member.- Specified by:
getModifiers
in interfaceClassMember
-
getDeclaration
public String getDeclaration()
-
makeRef
public SootFieldRef makeRef()
-
-