public interface ICodeMetadata
| Modifier and Type | Field and Description |
|---|---|
static ICodeMetadata |
EMPTY |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.Integer,ICodeAnnotation> |
getAsMap() |
@Nullable ICodeAnnotation |
getAt(int position) |
@Nullable ICodeAnnotation |
getClosestUp(int position) |
java.util.Map<java.lang.Integer,java.lang.Integer> |
getLineMapping() |
@Nullable ICodeNodeRef |
getNodeAt(int position)
Get current node at position (can be enclosing class or method)
|
@Nullable ICodeNodeRef |
getNodeBelow(int position)
Any definition of class or method below position
|
<T> T |
searchDown(int startPos,
java.util.function.BiFunction<java.lang.Integer,ICodeAnnotation,T> visitor)
Iterate code annotations from
startPos to higher positions. |
<T> T |
searchUp(int startPos,
java.util.function.BiFunction<java.lang.Integer,ICodeAnnotation,T> visitor)
Iterate code annotations from
startPos to smaller positions. |
@Nullable ICodeAnnotation |
searchUp(int position,
ICodeAnnotation.AnnType annType) |
@Nullable ICodeAnnotation |
searchUp(int position,
int limitPos,
ICodeAnnotation.AnnType annType) |
static final ICodeMetadata EMPTY
@Nullable @Nullable ICodeAnnotation getAt(int position)
@Nullable @Nullable ICodeAnnotation getClosestUp(int position)
@Nullable @Nullable ICodeAnnotation searchUp(int position, ICodeAnnotation.AnnType annType)
@Nullable @Nullable ICodeAnnotation searchUp(int position, int limitPos, ICodeAnnotation.AnnType annType)
@Nullable
<T> T searchUp(int startPos,
java.util.function.BiFunction<java.lang.Integer,ICodeAnnotation,T> visitor)
startPos to smaller positions.visitor - return not null value to stop iterations@Nullable
<T> T searchDown(int startPos,
java.util.function.BiFunction<java.lang.Integer,ICodeAnnotation,T> visitor)
startPos to higher positions.visitor - return not null value to stop iterations@Nullable @Nullable ICodeNodeRef getNodeAt(int position)
@Nullable @Nullable ICodeNodeRef getNodeBelow(int position)
java.util.Map<java.lang.Integer,ICodeAnnotation> getAsMap()
java.util.Map<java.lang.Integer,java.lang.Integer> getLineMapping()