Interface GraphElements<M,F,S,P>
- Type Parameters:
M
- type representing methodsF
- type representing fieldsS
- type representing signatureP
- type representing source code location
public interface GraphElements<M,F,S,P>
Representation of methods, fields, their signatures and code locations.
-
Method Summary
Modifier and TypeMethodDescriptionRecognizes a field.fieldDeclaringClass
(F field) Field's declaring class.int
fieldModifiers
(F field) Field modifiers.Name of a field.fieldTypeName
(F field) Type name of the field.Recognize method.byte[]
methodCode
(M method) Bytecode for a method.methodDeclaringClass
(M method) Method's declaring class.int
methodModifiers
(M method) Method modifiers.methodName
(M method) Method name.methodSignature
(M method) Method's signature.methodStackTraceElement
(M method, int bci, P pos) Stack trace element for a method, index and position.nodeSourcePosition
(Object object) Recognize a source position.int
nodeSourcePositionBCI
(P pos) Byte code index of a position.Caller of a position.Method for a position.Recognizes signature.int
signatureParameterCount
(S signature) Number of parameters of a signature.signatureParameterTypeName
(S signature, int index) Type name of a signature parameter.signatureReturnTypeName
(S signature) Type name of a return type.
-
Method Details
-
method
-
methodCode
Bytecode for a method.- Parameters:
method
- the method- Returns:
- bytecode of the method
-
methodModifiers
Method modifiers.- Parameters:
method
- the method- Returns:
- its modifiers
-
methodSignature
-
methodName
-
methodDeclaringClass
Method's declaring class. The returned object shall be aClass
or be recognizable byGraphTypes.typeName(java.lang.Object)
method.- Parameters:
method
- the method- Returns:
- object representing class that defined the method
-
field
-
fieldModifiers
-
fieldTypeName
-
fieldName
-
fieldDeclaringClass
Field's declaring class. The returned object shall be aClass
or be recognizable byGraphTypes.typeName(java.lang.Object)
method.- Parameters:
field
- the field- Returns:
- object representing class that defined the field
-
signature
-
signatureParameterCount
Number of parameters of a signature.- Parameters:
signature
- the signature- Returns:
- number of parameters
-
signatureParameterTypeName
Type name of a signature parameter.- Parameters:
signature
- the signatureindex
- index from 0 tosignatureParameterCount(java.lang.Object)
- 1- Returns:
- the type name
-
signatureReturnTypeName
-
nodeSourcePosition
-
nodeSourcePositionMethod
-
nodeSourcePositionCaller
-
nodeSourcePositionBCI
Byte code index of a position.- Parameters:
pos
- the position- Returns:
- the BCI of the position
-
methodStackTraceElement
Stack trace element for a method, index and position. This is the basic version of the method that works withStackTraceElement
and is suitable for Java-like languages. Should you need to provide more details about the location of multiple strata, seeGraphLocations
interface that gives more control over the provided location data.- Parameters:
method
- the methodbci
- the indexpos
- the position- Returns:
- stack trace element for the method, index and position
-