Interface StatePoint
-
- All Known Subinterfaces:
ClassDependencyManufacturerContext
,TypeQualifierInterrogatorContext
- All Known Implementing Classes:
StatePointImpl
,TypeQualifierInterrogation
public interface StatePoint
Identifies 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.AnnotatedElement
getAnnotatedElement()
Convenience to obtain 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
.static StatePoint
of(java.lang.reflect.Executable executable, int parameterIndex)
static StatePoint
of(java.lang.reflect.Field field)
CreatesStatePoint
for aField
.default java.lang.String
toLocation()
Obtains the location of thisStatePoint
.static java.lang.String
toLocation(StatePoint statePoint)
Obtains the location of theStatePoint
.
-
-
-
Method Detail
-
getField
java.lang.reflect.Field getField()
Obtains theField
.- Returns:
Field
. Will benull
ifExecutable
.
-
getExecutable
java.lang.reflect.Executable getExecutable()
Obtains theExecutable
. Typically this is either theConstructor
orMethod
loading the dependency.- Returns:
Executable
. Will benull
ifField
.
-
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
Field
orParameter
.- 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)
CreatesStatePoint
for aField
.- Parameters:
field
-Field
.- Returns:
StatePoint
.
-
of
static StatePoint of(java.lang.reflect.Executable executable, int parameterIndex)
- Parameters:
executable
-Executable
.parameterIndex
-Parameter
index.- 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
.
-
-