Package jadx.api.metadata.impl
Class CodeMetadataStorage
- java.lang.Object
-
- jadx.api.metadata.impl.CodeMetadataStorage
-
- All Implemented Interfaces:
ICodeMetadata
public class CodeMetadataStorage extends java.lang.Object implements ICodeMetadata
-
-
Field Summary
-
Fields inherited from interface jadx.api.metadata.ICodeMetadata
EMPTY
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ICodeMetadatabuild(java.util.Map<java.lang.Integer,java.lang.Integer> lines, java.util.Map<java.lang.Integer,ICodeAnnotation> map)static ICodeMetadataempty()java.util.NavigableMap<java.lang.Integer,ICodeAnnotation>getAsMap()ICodeAnnotationgetAt(int position)@Nullable ICodeAnnotationgetClosestUp(int position)java.util.Map<java.lang.Integer,java.lang.Integer>getLineMapping()ICodeNodeRefgetNodeAt(int position)Get current node at position (can be enclosing class or method)ICodeNodeRefgetNodeBelow(int position)Any definition of class or method below position<T> TsearchDown(int startPos, java.util.function.BiFunction<java.lang.Integer,ICodeAnnotation,T> visitor)Iterate code annotations fromstartPosto higher positions.@Nullable ICodeAnnotationsearchUp(int position, int limitPos, ICodeAnnotation.AnnType annType)@Nullable ICodeAnnotationsearchUp(int position, ICodeAnnotation.AnnType annType)<T> TsearchUp(int startPos, java.util.function.BiFunction<java.lang.Integer,ICodeAnnotation,T> visitor)Iterate code annotations fromstartPosto smaller positions.java.lang.StringtoString()
-
-
-
Method Detail
-
build
public static ICodeMetadata build(java.util.Map<java.lang.Integer,java.lang.Integer> lines, java.util.Map<java.lang.Integer,ICodeAnnotation> map)
-
empty
public static ICodeMetadata empty()
-
getAt
public ICodeAnnotation getAt(int position)
- Specified by:
getAtin interfaceICodeMetadata
-
getClosestUp
@Nullable public @Nullable ICodeAnnotation getClosestUp(int position)
- Specified by:
getClosestUpin interfaceICodeMetadata
-
searchUp
@Nullable public @Nullable ICodeAnnotation searchUp(int position, ICodeAnnotation.AnnType annType)
- Specified by:
searchUpin interfaceICodeMetadata
-
searchUp
@Nullable public @Nullable ICodeAnnotation searchUp(int position, int limitPos, ICodeAnnotation.AnnType annType)
- Specified by:
searchUpin interfaceICodeMetadata
-
searchUp
@Nullable public <T> T searchUp(int startPos, java.util.function.BiFunction<java.lang.Integer,ICodeAnnotation,T> visitor)Description copied from interface:ICodeMetadataIterate code annotations fromstartPosto smaller positions.- Specified by:
searchUpin interfaceICodeMetadatavisitor- return not null value to stop iterations
-
searchDown
@Nullable public <T> T searchDown(int startPos, java.util.function.BiFunction<java.lang.Integer,ICodeAnnotation,T> visitor)Description copied from interface:ICodeMetadataIterate code annotations fromstartPosto higher positions.- Specified by:
searchDownin interfaceICodeMetadatavisitor- return not null value to stop iterations
-
getNodeAt
public ICodeNodeRef getNodeAt(int position)
Description copied from interface:ICodeMetadataGet current node at position (can be enclosing class or method)- Specified by:
getNodeAtin interfaceICodeMetadata
-
getNodeBelow
public ICodeNodeRef getNodeBelow(int position)
Description copied from interface:ICodeMetadataAny definition of class or method below position- Specified by:
getNodeBelowin interfaceICodeMetadata
-
getAsMap
public java.util.NavigableMap<java.lang.Integer,ICodeAnnotation> getAsMap()
- Specified by:
getAsMapin interfaceICodeMetadata
-
getLineMapping
public java.util.Map<java.lang.Integer,java.lang.Integer> getLineMapping()
- Specified by:
getLineMappingin interfaceICodeMetadata
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-