Package sootup.core.model
Class SootField
- All Implemented Interfaces:
Field
,HasPosition
- Direct Known Subclasses:
JavaSootField
Soot's counterpart of the source language's field concept. Soot representation of a Java field.
Can be declared to belong to a SootClass.
- Author:
- Linghui Luo, Jan Martin Persch
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
static class
Defines aSootField
builder to provide a fluent API. -
Constructor Summary
ConstructorDescriptionSootField
(FieldSignature signature, Iterable<FieldModifier> modifiers, Position position) Constructs a Soot field with the given name, type and modifiers. -
Method Summary
Modifier and TypeMethodDescriptionstatic SootField.SignatureStep
builder()
Creates aSootField
int
Returns a hash code for this method consistent with structural equality.Gets the modifiers of this class member in an immutable set.getType()
boolean
isFinal()
Convenience method returning true if this field is final.boolean
Convenience method returning true if this class member is private.boolean
Convenience method returning true if this class member is protected.boolean
isPublic()
Convenience method returning true if this class member is public.boolean
isStatic()
Convenience method returning true if this class member is static.withModifiers
(Iterable<FieldModifier> modifiers) withSignature
(FieldSignature signature) Methods inherited from class sootup.core.model.SootClassMember
getDeclaringClassType, getName, getPosition, getSignature, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface sootup.core.model.Field
getSignature
-
Constructor Details
-
SootField
public SootField(@Nonnull FieldSignature signature, @Nonnull Iterable<FieldModifier> modifiers, @Nonnull Position position) Constructs a Soot field with the given name, type and modifiers.
-
-
Method Details
-
isProtected
public boolean isProtected()Description copied from class:SootClassMember
Convenience method returning true if this class member is protected.- Specified by:
isProtected
in classSootClassMember<FieldSignature>
-
isPrivate
public boolean isPrivate()Description copied from class:SootClassMember
Convenience method returning true if this class member is private.- Specified by:
isPrivate
in classSootClassMember<FieldSignature>
-
isPublic
public boolean isPublic()Description copied from class:SootClassMember
Convenience method returning true if this class member is public.- Specified by:
isPublic
in classSootClassMember<FieldSignature>
-
isStatic
public boolean isStatic()Description copied from class:SootClassMember
Convenience method returning true if this class member is static.- Specified by:
isStatic
in classSootClassMember<FieldSignature>
-
isFinal
public boolean isFinal()Description copied from class:SootClassMember
Convenience method returning true if this field is final.- Specified by:
isFinal
in classSootClassMember<FieldSignature>
-
getModifiers
Gets the modifiers of this class member in an immutable set.- See Also:
-
equivHashCode
public int equivHashCode()Description copied from class:SootClassMember
Returns a hash code for this method consistent with structural equality.- Specified by:
equivHashCode
in classSootClassMember<FieldSignature>
-
getType
-
withSignature
-
withModifiers
-
builder
Creates aSootField
- Returns:
- A
SootField
-