Class InjectionResult
java.lang.Object
honeyroasted.fill.InjectionResult
The result of an attempted injection
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionInjectionResult(InjectionResult.Type type, Object value) Creates a newInjectionResult -
Method Summary
Modifier and TypeMethodDescriptionstatic InjectionResultCreates anInjectionResultof the typeInjectionResult.Type.ERRORwith a value equal to the given error messagestatic InjectionResultignore()static InjectionResultCreates anInjectionResultwith the given value.type()value()
-
Constructor Details
-
InjectionResult
Creates a newInjectionResult- Parameters:
type- The type of this resultvalue- The value of this result
-
-
Method Details
-
of
Creates anInjectionResultwith the given value. If the value is null, the result will be of the typeInjectionResult.Type.IGNORE, otherwise it will be of the typeInjectionResult.Type.SET- Parameters:
value- The value of the result- Returns:
- A new
InjectionResult
-
ignore
- Returns:
- A new
InjectionResultof the typeInjectionResult.Type.IGNOREwith a null value
-
error
Creates anInjectionResultof the typeInjectionResult.Type.ERRORwith a value equal to the given error message- Parameters:
message- The error message- Returns:
- A new
InjectionResult
-
value
- Returns:
- The value of this result (may be null)
-
type
- Returns:
- The type of this result
-