Class MethodIntrospector
- java.lang.Object
-
- org.inferred.freebuilder.processor.model.MethodIntrospector
-
- Direct Known Subclasses:
JavacMethodIntrospector,MethodIntrospector.NoMethodIntrospector
public abstract class MethodIntrospector extends java.lang.ObjectCompiler-specific methods for introspecting methods during compilation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classMethodIntrospector.IntrospectorClassLoaderLoadsJavacMethodIntrospectorusing types taken from both the environment class loader (for com.sun types, if available) and the processor class loader (for org.inferred types).private static classMethodIntrospector.NoMethodIntrospectorstatic interfaceMethodIntrospector.OwnMethodInvocationVisitor
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringJAVAC_METHOD_INTROSPECTOR
-
Constructor Summary
Constructors Constructor Description MethodIntrospector()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.Set<javax.lang.model.element.Name>getOwnMethodInvocations(javax.lang.model.element.ExecutableElement method)Returns a set of methods which are definitely invoked onthisin the given method, or the empty set if method introspection is not supported on this compiler.static MethodIntrospectorinstance(javax.annotation.processing.ProcessingEnvironment env)Returns aMethodIntrospectorimplementation for the given environment.abstract voidvisitAllOwnMethodInvocations(javax.lang.model.element.ExecutableElement method, MethodIntrospector.OwnMethodInvocationVisitor visitor)Callsvisitorwith every method invoked onthisin the given method, if method introspection is supported on this compiler.
-
-
-
Field Detail
-
JAVAC_METHOD_INTROSPECTOR
private static final java.lang.String JAVAC_METHOD_INTROSPECTOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOwnMethodInvocations
public abstract java.util.Set<javax.lang.model.element.Name> getOwnMethodInvocations(javax.lang.model.element.ExecutableElement method)
Returns a set of methods which are definitely invoked onthisin the given method, or the empty set if method introspection is not supported on this compiler.
-
visitAllOwnMethodInvocations
public abstract void visitAllOwnMethodInvocations(javax.lang.model.element.ExecutableElement method, MethodIntrospector.OwnMethodInvocationVisitor visitor)Callsvisitorwith every method invoked onthisin the given method, if method introspection is supported on this compiler.The visitor is given the method name, and a logger to log warnings or errors to the user at the method invocation site.
-
instance
public static MethodIntrospector instance(javax.annotation.processing.ProcessingEnvironment env)
Returns aMethodIntrospectorimplementation for the given environment.
-
-