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
TypeQualifierInterrogatorContext
implementation.- 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.String
extractTypeQualifier(StatePoint statePoint)
Extracts the possible type qualifier.java.lang.reflect.AnnotatedElement
getAnnotatedElement()
Obtains theAnnotatedElement
.java.lang.reflect.Executable
getExecutable()
Obtains theExecutable
.int
getExecutableParameterIndex()
Obtains the index of the parameter on theExecutable
.java.lang.reflect.Field
getField()
Obtains theField
.SourceContext
getSourceContext()
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
null
if no qualification. - Throws:
java.lang.Exception
- If fails to extract the type qualifier.
-
getAnnotatedElement
public java.lang.reflect.AnnotatedElement getAnnotatedElement()
Description copied from interface:TypeQualifierInterrogatorContext
Obtains the
AnnotatedElement
.Typically this is either a
Field
orParameter
.- Specified by:
getAnnotatedElement
in interfaceStatePoint
- Specified by:
getAnnotatedElement
in interfaceTypeQualifierInterrogatorContext
- Returns:
AnnotatedElement
.
-
getField
public java.lang.reflect.Field getField()
Description copied from interface:StatePoint
Obtains theField
.- Specified by:
getField
in interfaceStatePoint
- Returns:
Field
. Will benull
ifExecutable
.
-
getExecutable
public java.lang.reflect.Executable getExecutable()
Description copied from interface:StatePoint
Obtains theExecutable
. Typically this is either theConstructor
orMethod
loading the dependency.- Specified by:
getExecutable
in interfaceStatePoint
- Returns:
Executable
. Will benull
ifField
.
-
getExecutableParameterIndex
public int getExecutableParameterIndex()
Description copied from interface:StatePoint
Obtains the index of the parameter on theExecutable
.- Specified by:
getExecutableParameterIndex
in interfaceStatePoint
- Returns:
- Index of the parameter on the
Executable
.
-
getSourceContext
public SourceContext getSourceContext()
Description copied from interface:TypeQualifierInterrogatorContext
Obtains theSourceContext
.- Specified by:
getSourceContext
in interfaceTypeQualifierInterrogatorContext
- Returns:
SourceContext
.
-
-