Interface IJavaClass
- All Superinterfaces:
IJavaDecompilableElement,IJavaElement
Java AST interface to represent a Java class or interface. Class elements contain other classes
(inner classes), fields, and methods.
-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
FLAG_BUILT, FLAG_FIELD_REFERENCES_OUTERCLASS, FLAG_LAMBDA_CLASS, FLAG_LAMBDA_IMPL, FLAG_OPTIONAL_RENDERING, FLAG_SECOND_PARAMETER_IS_OUTER_REF, FLAG_STICKY -
Method Summary
Modifier and TypeMethodDescriptionbooleanRegister a class to be imported in the namespace.Duplicate this element.voidgenerate(JavaOutputSink out, List<IJavaExpression> newArgs, int anonStart, boolean bodyOnly) intGet the annotations for this type.This convenience method is used to retrieve the list of fields.Get the implemented or extended interface types.Get an imported class signature from its simple name.This convenience method is used to retrieve the list of inner classes.This convenience method is used to retrieve the list of methods.getName()Get the type name.Get this element's signature.Get the super type.getType()Get the class or interface type.booleanbooleanbooleanbooleanisInner()booleanbooleanisStatic()booleanMethods inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaDecompilableElement
getGlobalContext, isBuilt, isExternal, isOptionalRendering, markBuilt, markNotBuilt, markOptionalRenderingMethods inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
addFlags, addTag, canCauseException, collectAllPhysicalOffsets, generate, getData, getElementType, getFlags, getOrigin, getPhysicalMethodIndex, getPhysicalOffset, getReconAnon, getReconEnum, getReconEnummap, getReconLambda, getSubElements, getTags, hasFlags, hasPhysicalMethodIndex, hasPhysicalOffset, isReconArtifact, removeFlags, removeTag, replaceSubElement, setData, setFlags, setLambdaRecon, setOrigin, setPhysicalMethodIndex, setPhysicalOffset, setReconAnon, setReconEnum, setReconEnummap, toShortString, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPre, visitDepthPre, visitDepthPre
-
Method Details
-
getAccessFlags
int getAccessFlags() -
isInner
boolean isInner() -
isAnonymous
boolean isAnonymous() -
isStatic
boolean isStatic() -
isInterface
boolean isInterface() -
isEnumeration
boolean isEnumeration() -
isAnnotation
boolean isAnnotation() -
isSynthetic
boolean isSynthetic() -
getName
String getName()Get the type name. The name is a fully-qualified Java name, such as:Lcom/foo/Bar;- Specified by:
getNamein interfaceIJavaDecompilableElement- Returns:
- the class name
-
getType
IJavaType getType()Get the class or interface type.- Returns:
- the type
-
getSignature
String getSignature()Description copied from interface:IJavaDecompilableElementGet this element's signature.- Specified by:
getSignaturein interfaceIJavaDecompilableElement- Returns:
- original internal signature
-
getSupertype
IJavaType getSupertype()Get the super type.- Returns:
-
getImplementedInterfaces
Get the implemented or extended interface types.- Returns:
-
getAnnotations
List<IJavaAnnotation> getAnnotations()Get the annotations for this type.- Returns:
-
getInnerClassSignatures
- Returns:
-
getInnerClasses
List<IJavaClass> getInnerClasses()This convenience method is used to retrieve the list of inner classes.- Returns:
- the list of inner classes
-
getAnonymousClassSignatures
- Returns:
-
getAnonymousClasses
List<IJavaClass> getAnonymousClasses()- Returns:
-
getFieldSignatures
- Returns:
-
getFields
List<IJavaField> getFields()This convenience method is used to retrieve the list of fields.- Returns:
- the list of fields
-
getMethodsSignatures
- Returns:
-
getMethods
List<IJavaMethod> getMethods()This convenience method is used to retrieve the list of methods.- Returns:
- the list of methods
-
addImport
Register a class to be imported in the namespace.- Parameters:
simplename- simple class namesignature- FQSS class signature- Returns:
-
getImport
Get an imported class signature from its simple name.- Parameters:
simplename- simple class name- Returns:
- FQSS class signature
-
generate
- Parameters:
out-newArgs-anonStart-bodyOnly-
-
duplicate
IJavaClass duplicate()Description copied from interface:IJavaElementDuplicate this element.- Specified by:
duplicatein interfaceIJavaDecompilableElement- Specified by:
duplicatein interfaceIJavaElement- Returns:
- a (possibly) duplicated object of the same type
-