Package caseine.reflect
Class ParserWithReflectUtilities
java.lang.Object
caseine.reflect.ParserWithReflectUtilities
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic com.github.javaparser.ast.body.TypeDeclarationstatic com.github.javaparser.ast.body.ConstructorDeclarationstatic com.github.javaparser.ast.body.MethodDeclarationGet the parsed body of a methodstatic com.github.javaparser.ast.body.ConstructorDeclarationfind(Constructor constructor) static com.github.javaparser.ast.body.MethodDeclarationstatic com.github.javaparser.ast.body.ConstructorDeclarationfindWithGeneric(Class<?> c, String genericType, Class<?>... params) static com.github.javaparser.ast.body.ConstructorDeclarationfindWithGeneric(Constructor constructor, String genericType) static com.github.javaparser.ast.CompilationUnitstatic com.github.javaparser.ast.CompilationUnit
-
Constructor Details
-
ParserWithReflectUtilities
public ParserWithReflectUtilities()
-
-
Method Details
-
equals
-
parse
-
parse
-
find
public static com.github.javaparser.ast.body.MethodDeclaration find(Class<?> c, String methodName, Class<?>... params) Get the parsed body of a method- Parameters:
c- the class where the method ismethodName- the method nameparams- the method parameters- Returns:
- the body of method in class c named methodName with params for parametres or null if it does not exist.
-
find
public static com.github.javaparser.ast.body.ConstructorDeclaration find(Class<?> c, Class<?>... params) - Parameters:
c- the object class of the class whose the constructor body is neededparams- the params of the constructor- Returns:
- the body of constructor in class c with params as parameters or null if it does not exist.
-
findWithGeneric
public static com.github.javaparser.ast.body.ConstructorDeclaration findWithGeneric(Class<?> c, String genericType, Class<?>... params) - Parameters:
c- the object class of the class whose the constructor body is neededparams- the params of the constructor- Returns:
- the body of constructor in class c with params as parameters or null if it does not exist.
-
find
-
find
- Parameters:
method- we want the body- Returns:
- the body of method or null if it does not exist.
-
find
- Parameters:
constructor- we want the body- Returns:
- the body of constructor or null if it does not exist.
-
findWithGeneric
public static com.github.javaparser.ast.body.ConstructorDeclaration findWithGeneric(Constructor constructor, String genericType) - Parameters:
constructor- we want the body- Returns:
- the body of constructor or null if it does not exist.
-