Class TypeQualifierInterrogation
- java.lang.Object
-
- net.officefloor.plugin.clazz.qualifier.TypeQualifierInterrogation
-
- All Implemented Interfaces:
TypeQualifierInterrogatorContext,StatePoint
public class TypeQualifierInterrogation extends java.lang.Object implements TypeQualifierInterrogatorContext
TypeQualifierInterrogatorContextimplementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description TypeQualifierInterrogation(SourceContext sourceContext)Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringextractTypeQualifier(StatePoint statePoint)Extracts the possible type qualifier.java.lang.reflect.AnnotatedElementgetAnnotatedElement()Obtains theAnnotatedElement.java.lang.reflect.ExecutablegetExecutable()Obtains theExecutable.intgetExecutableParameterIndex()Obtains the index of the parameter on theExecutable.java.lang.reflect.FieldgetField()Obtains theField.SourceContextgetSourceContext()Obtains theSourceContext.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.plugin.clazz.state.StatePoint
toLocation
-
-
-
-
Constructor Detail
-
TypeQualifierInterrogation
public TypeQualifierInterrogation(SourceContext sourceContext)
Instantiate.- Parameters:
sourceContext-SourceContext.
-
-
Method Detail
-
extractTypeQualifier
public java.lang.String extractTypeQualifier(StatePoint statePoint) throws java.lang.Exception
Extracts the possible type qualifier.- Parameters:
statePoint-StatePoint.- Returns:
- Type qualifier or
nullif no qualification. - Throws:
java.lang.Exception- If fails to extract the type qualifier.
-
getAnnotatedElement
public java.lang.reflect.AnnotatedElement getAnnotatedElement()
Description copied from interface:TypeQualifierInterrogatorContextObtains the
AnnotatedElement.Typically this is either a
FieldorParameter.- Specified by:
getAnnotatedElementin interfaceStatePoint- Specified by:
getAnnotatedElementin interfaceTypeQualifierInterrogatorContext- Returns:
AnnotatedElement.
-
getField
public java.lang.reflect.Field getField()
Description copied from interface:StatePointObtains theField.- Specified by:
getFieldin interfaceStatePoint- Returns:
Field. Will benullifExecutable.
-
getExecutable
public java.lang.reflect.Executable getExecutable()
Description copied from interface:StatePointObtains theExecutable. Typically this is either theConstructororMethodloading the dependency.- Specified by:
getExecutablein interfaceStatePoint- Returns:
Executable. Will benullifField.
-
getExecutableParameterIndex
public int getExecutableParameterIndex()
Description copied from interface:StatePointObtains the index of the parameter on theExecutable.- Specified by:
getExecutableParameterIndexin interfaceStatePoint- Returns:
- Index of the parameter on the
Executable.
-
getSourceContext
public SourceContext getSourceContext()
Description copied from interface:TypeQualifierInterrogatorContextObtains theSourceContext.- Specified by:
getSourceContextin interfaceTypeQualifierInterrogatorContext- Returns:
SourceContext.
-
-