Package sootup.core.model
Class SootClass
java.lang.Object
sootup.core.model.AbstractClass
sootup.core.model.SootClass
- All Implemented Interfaces:
HasPosition
- Direct Known Subclasses:
JavaSootClass
Soot's counterpart of the source languages class concept. Soot representation of a Java class.
They are usually created by a Scene, but can also be constructed manually through the given
constructors.
- Author:
- Manuel Benz, Linghui Luo, Jan Martin Persch
-
Field Summary
Fields inherited from class sootup.core.model.AbstractClass
classSource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a backed Chain of the interfaces that are directly implemented by this class.Set<? extends SootMethod>
Returns the modifiers of this class in an immutable set.getName()
This method returns the outer class.Line and column information of the corresponding code object that this represents.WARNING: interfaces in Java are subclasses of the java.lang.Object class! Returns the superclass of this class.getType()
Returns the ClassSignature of this class.boolean
boolean
WARNING: interfaces are subclasses of the java.lang.Object class! Does this class have a superclass? False implies that this is the java.lang.Object class.boolean
implementsInterface
(ClassType classSignature) Does this class directly implement the given interface? (see getInterfaceCount())boolean
Convenience method returning true if this class is abstract.boolean
boolean
Returns true if this class is an application class.boolean
Returns true if this class is not an interface and not abstract.boolean
isEnum()
Convenience method; returns true if this class is an enumeration.boolean
isFinal()
Convenience method returning true if this class is final.boolean
boolean
Convenience method; returns true if this class is an interface.boolean
Returns true if this class is a library class.boolean
Convenience method returning true if this class is private.boolean
Convenience method returning true if this class is protected.boolean
isPublic()
Convenience method; returns true if this class is public.boolean
isStatic()
Convenience method returning true if this class is static.boolean
isSuper()
Convenience method; returns true if this class is synchronized.print()
Returns the serialized Jimple of this SootClass as StringtoString()
Returns the name of this class.withClassSource
(SootClassSource classSource) withSourceType
(SourceType sourceType) Methods inherited from class sootup.core.model.AbstractClass
getField, getField, getMethod, getMethod, getMethodsByName
-
Field Details
-
sourceType
-
classSignature
-
-
Constructor Details
-
SootClass
-
-
Method Details
-
getMethods
- Specified by:
getMethods
in classAbstractClass
-
getFields
- Specified by:
getFields
in classAbstractClass
-
getModifiers
Returns the modifiers of this class in an immutable set. -
getInterfaces
Returns a backed Chain of the interfaces that are directly implemented by this class. Note that direct implementation corresponds to an "implements" keyword in the Java class file and that this class may still be implementing additional interfaces in the usual sense by being a subclass of a class which directly implements some interfaces. -
implementsInterface
Does this class directly implement the given interface? (see getInterfaceCount()) -
hasSuperclass
public boolean hasSuperclass()WARNING: interfaces are subclasses of the java.lang.Object class! Does this class have a superclass? False implies that this is the java.lang.Object class. Note that interfaces are subclasses of the java.lang.Object class. -
getSuperclass
WARNING: interfaces in Java are subclasses of the java.lang.Object class! Returns the superclass of this class. (see hasSuperclass()) -
hasOuterClass
public boolean hasOuterClass() -
getOuterClass
This method returns the outer class. -
isInnerClass
public boolean isInnerClass() -
getType
Returns the ClassSignature of this class.- Specified by:
getType
in classAbstractClass
-
isInterface
public boolean isInterface()Convenience method; returns true if this class is an interface. -
isEnum
public boolean isEnum()Convenience method; returns true if this class is an enumeration. -
isSuper
public boolean isSuper()Convenience method; returns true if this class is synchronized. -
isConcrete
public boolean isConcrete()Returns true if this class is not an interface and not abstract. -
isPublic
public boolean isPublic()Convenience method; returns true if this class is public. -
toString
Returns the name of this class. -
print
Returns the serialized Jimple of this SootClass as String -
isApplicationClass
public boolean isApplicationClass()Returns true if this class is an application class. -
isLibraryClass
public boolean isLibraryClass()Returns true if this class is a library class. -
isPrivate
public boolean isPrivate()Convenience method returning true if this class is private. -
isProtected
public boolean isProtected()Convenience method returning true if this class is protected. -
isAbstract
public boolean isAbstract()Convenience method returning true if this class is abstract. -
isFinal
public boolean isFinal()Convenience method returning true if this class is final. -
isStatic
public boolean isStatic()Convenience method returning true if this class is static. -
isAnnotation
public boolean isAnnotation() -
getPosition
Description copied from interface:HasPosition
Line and column information of the corresponding code object that this represents.- Specified by:
getPosition
in interfaceHasPosition
- Returns:
- a
Position
containing position information.
-
getClassSource
- Overrides:
getClassSource
in classAbstractClass
-
getName
- Specified by:
getName
in classAbstractClass
-
withClassSource
-
withSourceType
-