Package org.apache.camel.dsl.yaml.common
Class YamlDeserializerBase<T>
java.lang.Object
org.apache.camel.dsl.yaml.common.YamlDeserializerSupport
org.apache.camel.dsl.yaml.common.YamlDeserializerBase<T>
- All Implemented Interfaces:
org.snakeyaml.engine.v2.api.ConstructNode
- Direct Known Subclasses:
YamlDeserializerEndpointAwareBase
public abstract class YamlDeserializerBase<T>
extends YamlDeserializerSupport
implements org.snakeyaml.engine.v2.api.ConstructNode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterPropertiesSet(T target, org.snakeyaml.engine.v2.nodes.Node node) Allows custom validation after the properties has been set on the targetconstruct(org.snakeyaml.engine.v2.nodes.Node node) getType()protected voidhandleUnknownProperty(T target, String propertyKey, String propertyName, org.snakeyaml.engine.v2.nodes.Node value) protected abstract TCreates a Java instance of the expected type.protected TnewInstance(String value) Creates a Java instance of the expected type from a string.protected voidonNewTarget(org.snakeyaml.engine.v2.nodes.Node node, T target, int line) protected voidsetProperties(T target, org.snakeyaml.engine.v2.nodes.MappingNode node) Set properties from a YAML node to the given target.protected booleansetProperty(T target, String propertyKey, String propertyName, org.snakeyaml.engine.v2.nodes.Node value) Set a property to the given target.Methods inherited from class org.apache.camel.dsl.yaml.common.YamlDeserializerSupport
asBoolean, asByteArray, asByteArray, asClass, asClass, asClassArray, asCollection, asDouble, asEndpoint, asEndpoint, asEnum, asFlatCollection, asFlatList, asFlatSet, asInt, asList, asLong, asMap, asMappingNode, asScalarMap, asSequenceNode, asStringList, asStringList, asStringSet, asStringSet, asText, asType, enumConverter, getDeserializationContext, isSequenceNode, nodeAt, parseParameters, setDeserializationContext, setStepsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.snakeyaml.engine.v2.api.ConstructNode
constructRecursive
-
Constructor Details
-
YamlDeserializerBase
-
-
Method Details
-
getType
-
construct
- Specified by:
constructin interfaceorg.snakeyaml.engine.v2.api.ConstructNode
-
newInstance
Creates a Java instance of the expected type.- Returns:
- the instance.
-
afterPropertiesSet
Allows custom validation after the properties has been set on the target -
newInstance
Creates a Java instance of the expected type from a string.- Returns:
- the instance.
-
setProperty
protected boolean setProperty(T target, String propertyKey, String propertyName, org.snakeyaml.engine.v2.nodes.Node value) Set a property to the given target.- Parameters:
target- the target objectpropertyKey- the normalized property keypropertyName- the name of the property as defined in the YAMLvalue- the value of the property asNode
-
setProperties
Set properties from a YAML node to the given target.- Parameters:
target- the target objectnode- the node
-
handleUnknownProperty
-
onNewTarget
-