Package sootup.java.core
Class JavaClassFileMetadata
java.lang.Object
sootup.java.core.JavaClassFileMetadata
Immutable source and nesting attributes of a Java classfile.
-
Constructor Summary
ConstructorsConstructorDescriptionJavaClassFileMetadata(@Nullable String sourceFile, @Nullable String sourceDebugExtension, @Nullable JavaClassType enclosingClass, @Nullable MethodSignature enclosingMethod, @NonNull List<JavaInnerClassInfo> innerClasses) -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull JavaClassFileMetadataempty()@NonNull Optional<JavaClassType>Returns the EnclosingMethod owner, including when the class is declared in an initializer.@NonNull Optional<MethodSignature>Returns the enclosing method or constructor; initializers have no method signature.@NonNull List<JavaInnerClassInfo>Returns an immutable list of all InnerClasses entries in their classfile order.Returns decoded SourceDebugExtension text (for example SMAP), without interpreting it.
-
Constructor Details
-
JavaClassFileMetadata
public JavaClassFileMetadata(@Nullable String sourceFile, @Nullable String sourceDebugExtension, @Nullable JavaClassType enclosingClass, @Nullable MethodSignature enclosingMethod, @NonNull List<JavaInnerClassInfo> innerClasses) - Parameters:
sourceFile- the SourceFile attribute, ornullif absentsourceDebugExtension- the decoded, unparsed SourceDebugExtension attribute, ornullif absentenclosingClass- the owner from EnclosingMethod, ornullif that attribute is absentenclosingMethod- the enclosing method or constructor;nullwhen the attribute is absent or its method_index is zero (an initializer)innerClasses- InnerClasses entries in classfile order; a defensive copy is made- Throws:
IllegalArgumentException- if the enclosing method does not belong to the enclosing class
-
-
Method Details
-
empty
-
getSourceFile
-
getSourceDebugExtension
Returns decoded SourceDebugExtension text (for example SMAP), without interpreting it. -
getEnclosingClass
Returns the EnclosingMethod owner, including when the class is declared in an initializer. -
getEnclosingMethod
Returns the enclosing method or constructor; initializers have no method signature. -
getInnerClasses
Returns an immutable list of all InnerClasses entries in their classfile order.
-