Package sootup.java.core
Class JavaSootField
- All Implemented Interfaces:
Field
,HasPosition
,SootField
,HasAnnotation
public class JavaSootField
extends SootClassMember<FieldSignature>
implements SootField, HasAnnotation
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Defines aSootField
builder to provide a fluent API. -
Field Summary
Fields inherited from class sootup.core.model.SootClassMember
position, signature
-
Constructor Summary
ConstructorsConstructorDescriptionJavaSootField
(@NonNull FieldSignature signature, @NonNull Iterable<FieldModifier> modifiers, @NonNull Iterable<AnnotationUsage> annotations, @NonNull Position position) Constructs a Soot field with the given name, type and modifiers.JavaSootField
(@NonNull FieldSignature signature, @NonNull Iterable<FieldModifier> modifiers, @NonNull Position position) Constructs a Soot field with the given name, type and modifiers. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns a hash code for this method consistent with structural equality.@NonNull Iterable<AnnotationUsage>
@NonNull ClassType
Returns the SootClass declaring this one.@NonNull Set<FieldModifier>
Gets the modifiers of this class member in an immutable set.@NonNull Type
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.@NonNull JavaSootField
withAnnotations
(@NonNull Iterable<AnnotationUsage> annotations) @NonNull JavaSootField
withModifiers
(@NonNull Iterable<FieldModifier> modifiers) @NonNull JavaSootField
withSignature
(@NonNull FieldSignature signature) Methods inherited from class sootup.core.model.SootClassMember
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
-
JavaSootField
public JavaSootField(@NonNull FieldSignature signature, @NonNull Iterable<FieldModifier> modifiers, @NonNull Position position) Constructs a Soot field with the given name, type and modifiers. -
JavaSootField
public JavaSootField(@NonNull FieldSignature signature, @NonNull Iterable<FieldModifier> modifiers, @NonNull Iterable<AnnotationUsage> annotations, @NonNull Position position) Constructs a Soot field with the given name, type and modifiers.- Parameters:
signature
- the signature of the fieldmodifiers
- modifier of the fieldannotations
- annotations of the fieldposition
- position of the field
-
-
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 interfaceSootField
- 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 interfaceSootField
- 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 interfaceSootField
- 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 interfaceSootField
- 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 interfaceSootField
- Specified by:
isFinal
in classSootClassMember<FieldSignature>
-
getModifiers
Gets the modifiers of this class member in an immutable set.- Specified by:
getModifiers
in interfaceSootField
- 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
- Specified by:
withSignature
in interfaceSootField
-
withModifiers
- Specified by:
withModifiers
in interfaceSootField
-
getDeclaringClassType
Returns the SootClass declaring this one.- Specified by:
getDeclaringClassType
in interfaceSootField
- Overrides:
getDeclaringClassType
in classSootClassMember<FieldSignature>
-
getAnnotations
- Specified by:
getAnnotations
in interfaceHasAnnotation
-
withAnnotations
-