Interface IDTypeInfoProvider
public interface IDTypeInfoProvider
Type information provider interface.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve a field declared in the provided type.Retrieve a field.findMethod(String typename, String methodname, String descNoReturnType) Retrieve a method declared in the provided type.findMethod(String typename, String methodname, String descNoReturnType, boolean declared, String[] adeclType) Retrieve a method.Find type information.findTypesWithSuperMethods(String typename, String methodname, String methoddesc, boolean directOnly) Find types containing matching super-method declarations or implementations.booleanDetermine whether a type descends from a candidate parent type.booleanisCompatible(String typename, String candidateParentTypename) Determine whether a type can be assigned to a candidate parent type.isFunctionalType(String typename) Determine if the provided is a functional type: a type that implements a functional interface.
-
Method Details
-
isCompatible
Determine whether a type can be assigned to a candidate parent type.- Parameters:
typename- jvm canonical type name of a primitive, object, or array of anycandidateParentTypename- jvm canonical type name of a primitive, object, or array of any- Returns:
- true if the type is compatible with the candidate parent type
-
isChildOf
Determine whether a type descends from a candidate parent type.- Parameters:
typename- must be a non-array object typecandidateParentTypename- must be a non-array object type- Returns:
- true if the provided type descends from the provided candidate super type
-
findTypesWithSuperMethods
List<String> findTypesWithSuperMethods(String typename, String methodname, String methoddesc, boolean directOnly) Find types containing matching super-method declarations or implementations.- Parameters:
typename- must be a non-array object typemethodname- simple method namemethoddesc- method descriptordirectOnly- true to limit the search to direct parents- Returns:
- a list of types (binary form) containing super implementations or super declarations for the provided method
-
isFunctionalType
Determine if the provided is a functional type: a type that implements a functional interface.- Parameters:
typename- JVM type name- Returns:
- the functional interface name, or null if the type is not functional
-
findType
Find type information.- Parameters:
typename- JVM type name- Returns:
- the type information, or null if not found
-
findMethod
Retrieve a method declared in the provided type.- Parameters:
typename- jvm type namemethodname- simple method namedescNoReturnType- jvm descriptor without return type, that is the paren.-enclosed list of parameters, e.g.(I[J[[Ljava/lang/String;)- Returns:
- a method or null if not found
-
findMethod
IJLSMethod findMethod(String typename, String methodname, String descNoReturnType, boolean declared, String[] adeclType) Retrieve a method. Constructor methods can be retrieved as well. Type hierarchies can be examined.- Parameters:
typename- jvm type namemethodname- simple method namedescNoReturnType- jvm descriptor without return type, that is the paren.-enclosed list of parameters, e.g.(I[J[[Ljava/lang/String;)declared- if true, methods declared in the provided types will be examined (inherited methods will not be examined); if not, all public methods (declared and inherited) will be examined; if the method is a constructor method (<init>or<clinit>), inherited methods are never examinedadeclType- optional output array receiving the declaring type name- Returns:
- a method or null if not found
-
findField
Retrieve a field declared in the provided type.- Parameters:
typename- jvm type namefieldname- simple field name- Returns:
- a field or null if not found
-
findField
Retrieve a field. Type hierarchies can be examined.- Parameters:
typename- jvm type namefieldname- simple field namedeclared- if true, fields declared in the provided type will be examined (inherited fields will not be examined); if not, all public fields (declared and inherited) will be examinedadeclType- optional output array receiving the declaring type name- Returns:
- a field or null if not found
-