Modifier and Type | Method and Description |
---|---|
String |
findAnnotatedGetMethod(JClassType returnType,
Class<? extends Annotation> annotation,
boolean failIfAnnotationIsFoundOnWrongMethod)
Looks at the ginjector methods to find one that return the specified
type and that is annotated with the specified annotation.
|
String |
findGetMethod(JClassType returnType)
Looks at the ginjector methods to find one that return the specified
type.
|
String |
findGetMethod(JGenericType returnType,
JClassType returnTypeParameter)
Looks at the ginjector methods to find one that return the specified
parameterized type with the specified type as a parameter.
|
JClassType |
getGinjectorClass()
Access the ginjector class.
|
String |
getGinjectorClassName()
Access the ginjector class name.
|
void |
init()
Initializes the ginjector inspector.
|
public String getGinjectorClassName()
public JClassType getGinjectorClass()
public void init() throws UnableToCompleteException
gin.ginjector
.UnableToCompleteException
- If the ginjector property or class cannot be found, an error is logged.public String findGetMethod(JClassType returnType) throws UnableToCompleteException
returnType
- The type that should be returned by the get method.returnType<returnTypeParameter>
, or null
if not found.UnableToCompleteException
- If more than one matching method is found.public String findGetMethod(JGenericType returnType, JClassType returnTypeParameter) throws UnableToCompleteException
returnType
- The parameterized type that should be returned by the get method.returnTypeParameter
- The type parameter of returnType
.returnType<returnTypeParameter>
, or null
if not found.UnableToCompleteException
- If more than one matching method is found.public String findAnnotatedGetMethod(JClassType returnType, Class<? extends Annotation> annotation, boolean failIfAnnotationIsFoundOnWrongMethod) throws UnableToCompleteException
returnType
- The type that should be returned by the get method.annotation
- The annotation that should be present on the get method.failIfAnnotationIsFoundOnWrongMethod
- If true
, the call will throw an UnableToCompleteException
and log an error if the annotation is found on the wrong method.returnType
and annotated with annotation
,
or null
if not found.UnableToCompleteException
- If more than one matching method is found.Copyright © 2010–2014 Arcbees. All rights reserved.