Interface StatePoint
-
- All Known Subinterfaces:
ClassDependencyManufacturerContext,TypeQualifierInterrogatorContext
- All Known Implementing Classes:
StatePointImpl,TypeQualifierInterrogation
public interface StatePointIdentifies a state point.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.reflect.AnnotatedElementgetAnnotatedElement()Convenience to obtain theAnnotatedElement.java.lang.reflect.ExecutablegetExecutable()Obtains theExecutable.intgetExecutableParameterIndex()Obtains the index of the parameter on theExecutable.java.lang.reflect.FieldgetField()Obtains theField.static StatePointof(java.lang.reflect.Executable executable, int parameterIndex)static StatePointof(java.lang.reflect.Field field)CreatesStatePointfor aField.default java.lang.StringtoLocation()Obtains the location of thisStatePoint.static java.lang.StringtoLocation(StatePoint statePoint)Obtains the location of theStatePoint.
-
-
-
Method Detail
-
getField
java.lang.reflect.Field getField()
Obtains theField.- Returns:
Field. Will benullifExecutable.
-
getExecutable
java.lang.reflect.Executable getExecutable()
Obtains theExecutable. Typically this is either theConstructororMethodloading the dependency.- Returns:
Executable. Will benullifField.
-
getExecutableParameterIndex
int getExecutableParameterIndex()
Obtains the index of the parameter on theExecutable.- Returns:
- Index of the parameter on the
Executable.
-
getAnnotatedElement
default java.lang.reflect.AnnotatedElement getAnnotatedElement()
Convenience to obtain the
AnnotatedElement.This is the
FieldorParameter.- Returns:
AnnotatedElement.
-
toLocation
default java.lang.String toLocation()
Obtains the location of thisStatePoint.- Returns:
- Location of this
StatePoint.
-
of
static StatePoint of(java.lang.reflect.Field field)
CreatesStatePointfor aField.- Parameters:
field-Field.- Returns:
StatePoint.
-
of
static StatePoint of(java.lang.reflect.Executable executable, int parameterIndex)
- Parameters:
executable-Executable.parameterIndex-Parameterindex.- Returns:
StatePoint.
-
toLocation
static java.lang.String toLocation(StatePoint statePoint)
Obtains the location of theStatePoint. This is typically for logging.- Parameters:
statePoint-StatePoint.- Returns:
- Location of the
StatePoint.
-
-