Package org.spongepowered.configurate
Class RepresentationHint<V>
java.lang.Object
org.spongepowered.configurate.RepresentationHint<V>
- Type Parameters:
- V- the value type
A flag for configuration loaders describing how a node should be serialized.
 
A loader may not accept every representation hint available, but any understood hints should be exposed as constant fields on the loader class. Any unknown hints will be ignored.
- Since:
- 4.0.0
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionstatic <V> RepresentationHint.Builder<V>builder()Create a builder for a new hint.abstract @Nullable VIf a value for a representation hint cannot be found by quering a node or any of this parents, the default value will be returned.abstract StringAn identifier used to represent this hint in error messages.abstract booleanGet whether or not this hint can draw its value from parent nodes.static <V> RepresentationHint<V>Create a new basic representation hint.static <V> RepresentationHint<V>Create a new basic representation hint.abstract io.leangen.geantyref.TypeToken<V>The type that values of this type have to have.
- 
Method Details- 
ofCreate a new basic representation hint.The created hint will be inheritable and have no default value set. - Type Parameters:
- V- value type
- Parameters:
- identifier- hint identifier
- valueType- type of value the hint will hold
- Returns:
- a new hint
- Since:
- 4.0.0
 
- 
ofpublic static <V> RepresentationHint<V> of(String identifier, io.leangen.geantyref.TypeToken<V> valueType) Create a new basic representation hint.The created hint will be inheritable and have no default value set. - Type Parameters:
- V- value type
- Parameters:
- identifier- hint identifier
- valueType- type of value the hint will hold
- Returns:
- a new hint
- Since:
- 4.0.0
 
- 
builderCreate a builder for a new hint.- Type Parameters:
- V- value type
- Returns:
- a new builder
- Since:
- 4.0.0
 
- 
identifierAn identifier used to represent this hint in error messages.- Returns:
- the identifier
- Since:
- 4.0.0
 
- 
valueTypeThe type that values of this type have to have.- Returns:
- value type
- Since:
- 4.0.0
 
- 
defaultValueIf a value for a representation hint cannot be found by quering a node or any of this parents, the default value will be returned.- Returns:
- default type
- Since:
- 4.0.0
 
- 
inheritableGet whether or not this hint can draw its value from parent nodes.- Returns:
- if inheritable
- Since:
- 4.0.0
 
 
-