Top Description Inners Fields Constructors Methods
org.yaml.snakeyaml.constructor

public Class SafeConstructor

extends BaseConstructor
Class Inheritance
Known Direct Subclasses
org.yaml.snakeyaml.constructor.Constructor
Imports
java.math.BigInteger, java.util.ArrayList, .Calendar, .HashMap, .Iterator, .LinkedHashMap, .List, .Map, .Set, .TimeZone, .TreeSet, java.util.regex.Matcher, .Pattern, org.yaml.snakeyaml.LoaderOptions, org.yaml.snakeyaml.error.YAMLException, org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder, org.yaml.snakeyaml.nodes.MappingNode, .Node, .NodeId, .NodeTuple, .ScalarNode, .SequenceNode, .Tag

Construct standard Java classes

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public class
public class
public class
public class
public class
public class
public class
public class
public class
public class
public class
public static class

Field Summary

Modifier and TypeField and Description
private static final Map<String, Boolean>
private static final int[][]
private static final Pattern
public static final SafeConstructor.ConstructUndefined
private static final Pattern
Inherited from org.yaml.snakeyaml.constructor.BaseConstructor:
composerconstructedObjectsloadingConfigNOT_INSTANTIATED_OBJECTrootTagtypeDefinitionstypeTagsyamlClassConstructorsyamlConstructorsyamlMultiConstructors

Constructor Summary

AccessConstructor and Description
public
SafeConstructor(LoaderOptions
- the configuration options
loaderOptions
)

Create an instance

Method Summary

Modifier and TypeMethod and Description
protected void
constructMapping2ndStep(MappingNode
- source
node
,
Map<Object, Object>
- map to fill
mapping
)

Overrides org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep.

Fill provided Map with constructed data
protected void
protected static Number
createLongOrBigInteger(final String number, final int radix)

private Number
createNumber(int sign, String number, int radix)

protected void
protected void
flattenMapping(MappingNode node, boolean forceStringKeys)

private static int
maxLen(final int max, final int radix)

private static int
maxLen(final long max, final int radix)

private List<NodeTuple>

Returns:

list of the merged NodeTuple (to be set as value for the MappingNode)
mergeNode
(MappingNode
where to merge
node
,
boolean
true if keys of node should take precedence over others...
isPreffered
,
Map<Object, Integer>
maps already merged keys to index from values
key2index
,
List<NodeTuple>
collects merged NodeTuple
values
,
boolean forceStringKeys)

Does merge for supplied mapping node.

protected void
protected void
processDuplicateKeys(MappingNode node, boolean forceStringKeys)

Inherited from org.yaml.snakeyaml.constructor.BaseConstructor:
addTypeDescriptioncheckDataconstructArrayconstructArrayStep2constructDocumentconstructMappingconstructObjectconstructObjectNoCheckconstructScalarconstructSequenceconstructSequenceStep2constructSetconstructSetcreateArraycreateDefaultListcreateDefaultMapcreateDefaultSetfinalizeConstructiongetConstructorgetDatagetLoadingConfiggetPropertyUtilsgetSingleDataisAllowDuplicateKeysisEnumCaseSensitiveisExplicitPropertyUtilsisWrappedToRootExceptionnewInstancenewInstancenewInstancenewListnewMapnewSetpostponeMapFillingpostponeSetFillingsetAllowDuplicateKeyssetComposersetEnumCaseSensitivesetPropertyUtilssetWrappedToRootException

Field Detail

BOOL_VALUESback to summary
private static final Map<String, Boolean> BOOL_VALUES
RADIX_MAXback to summary
private static final int[][] RADIX_MAX
TIMESTAMP_REGEXPback to summary
private static final Pattern TIMESTAMP_REGEXP
undefinedConstructorback to summary
public static final SafeConstructor.ConstructUndefined undefinedConstructor
YMD_REGEXPback to summary
private static final Pattern YMD_REGEXP

Constructor Detail

SafeConstructorback to summary
public SafeConstructor(LoaderOptions loaderOptions)

Create an instance

Parameters
loaderOptions:LoaderOptions

- the configuration options

Method Detail

constructMapping2ndStepback to summary
protected void constructMapping2ndStep(MappingNode node, Map<Object, Object> mapping)

Overrides org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep.

Doc from org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep.

Fill provided Map with constructed data

Parameters
node:MappingNode

- source

mapping:Map<Object, Object>

- map to fill

Annotations
@Override
constructSet2ndStepback to summary
protected void constructSet2ndStep(MappingNode node, Set<Object> set)

Overrides org.yaml.snakeyaml.constructor.BaseConstructor.constructSet2ndStep.

Annotations
@Override
createLongOrBigIntegerback to summary
protected static Number createLongOrBigInteger(final String number, final int radix)
createNumberback to summary
private Number createNumber(int sign, String number, int radix)
flattenMappingback to summary
protected void flattenMapping(MappingNode node)
flattenMappingback to summary
protected void flattenMapping(MappingNode node, boolean forceStringKeys)
maxLenback to summary
private static int maxLen(final int max, final int radix)
maxLenback to summary
private static int maxLen(final long max, final int radix)
mergeNodeback to summary
private List<NodeTuple> mergeNode(MappingNode node, boolean isPreffered, Map<Object, Integer> key2index, List<NodeTuple> values, boolean forceStringKeys)

Does merge for supplied mapping node.

Parameters
node:MappingNode

where to merge

isPreffered:boolean

true if keys of node should take precedence over others...

key2index:Map<Object, Integer>

maps already merged keys to index from values

values:List<NodeTuple>

collects merged NodeTuple

Returns:List<NodeTuple>

list of the merged NodeTuple (to be set as value for the MappingNode)

processDuplicateKeysback to summary
protected void processDuplicateKeys(MappingNode node)
processDuplicateKeysback to summary
protected void processDuplicateKeys(MappingNode node, boolean forceStringKeys)
org.yaml.snakeyaml.constructor back to summary

public final Class SafeConstructor.ConstructUndefined

extends AbstractConstruct
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
Inherited from org.yaml.snakeyaml.constructor.AbstractConstruct:
construct2ndStep

Constructor Detail

ConstructUndefinedback to summary
public ConstructUndefined()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
org.yaml.snakeyaml.constructor back to summary

public Class SafeConstructor.ConstructYamlBinary

extends AbstractConstruct
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
Inherited from org.yaml.snakeyaml.constructor.AbstractConstruct:
construct2ndStep

Constructor Detail

ConstructYamlBinaryback to summary
public ConstructYamlBinary()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
org.yaml.snakeyaml.constructor back to summary

public Class SafeConstructor.ConstructYamlBool

extends AbstractConstruct
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
Inherited from org.yaml.snakeyaml.constructor.AbstractConstruct:
construct2ndStep

Constructor Detail

ConstructYamlBoolback to summary
public ConstructYamlBool()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
org.yaml.snakeyaml.constructor back to summary

public Class SafeConstructor.ConstructYamlFloat

extends AbstractConstruct
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
Inherited from org.yaml.snakeyaml.constructor.AbstractConstruct:
construct2ndStep

Constructor Detail

ConstructYamlFloatback to summary
public ConstructYamlFloat()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
org.yaml.snakeyaml.constructor back to summary

public Class SafeConstructor.ConstructYamlInt

extends AbstractConstruct
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
Inherited from org.yaml.snakeyaml.constructor.AbstractConstruct:
construct2ndStep

Constructor Detail

ConstructYamlIntback to summary
public ConstructYamlInt()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
org.yaml.snakeyaml.constructor back to summary

public Class SafeConstructor.ConstructYamlMap

extends Object
implements Construct
Class Inheritance
  • java.lang.Object
  • org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlMap
All Implemented Interfaces
org.yaml.snakeyaml.constructor.Construct

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
public void
construct2ndStep(Node
composed Node
node
,
Object
the instance constructed earlier by construct(Node node) for the provided Node
object
)

Implements org.yaml.snakeyaml.constructor.Construct.construct2ndStep.

Apply the second step when constructing recursive structures.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ConstructYamlMapback to summary
public ConstructYamlMap()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
construct2ndStepback to summary
public void construct2ndStep(Node node, Object object)

Implements org.yaml.snakeyaml.constructor.Construct.construct2ndStep.

Doc from org.yaml.snakeyaml.constructor.Construct.construct2ndStep.

Apply the second step when constructing recursive structures. Because the instance is already created it can assign a reference to itself.

Parameters
node:Node

composed Node

object:Object

the instance constructed earlier by construct(Node node) for the provided Node

Annotations
@Override
@SuppressWarnings:unchecked
org.yaml.snakeyaml.constructor back to summary

public Class SafeConstructor.ConstructYamlNull

extends AbstractConstruct
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
Inherited from org.yaml.snakeyaml.constructor.AbstractConstruct:
construct2ndStep

Constructor Detail

ConstructYamlNullback to summary
public ConstructYamlNull()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
org.yaml.snakeyaml.constructor back to summary

public Class SafeConstructor.ConstructYamlOmap

extends AbstractConstruct
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
Inherited from org.yaml.snakeyaml.constructor.AbstractConstruct:
construct2ndStep

Constructor Detail

ConstructYamlOmapback to summary
public ConstructYamlOmap()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
org.yaml.snakeyaml.constructor back to summary

public Class SafeConstructor.ConstructYamlPairs

extends AbstractConstruct
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
Inherited from org.yaml.snakeyaml.constructor.AbstractConstruct:
construct2ndStep

Constructor Detail

ConstructYamlPairsback to summary
public ConstructYamlPairs()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
org.yaml.snakeyaml.constructor back to summary

public Class SafeConstructor.ConstructYamlSeq

extends Object
implements Construct
Class Inheritance
  • java.lang.Object
  • org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlSeq
All Implemented Interfaces
org.yaml.snakeyaml.constructor.Construct

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
public void
construct2ndStep(Node
composed Node
node
,
Object
the instance constructed earlier by construct(Node node) for the provided Node
data
)

Implements org.yaml.snakeyaml.constructor.Construct.construct2ndStep.

Apply the second step when constructing recursive structures.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ConstructYamlSeqback to summary
public ConstructYamlSeq()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
construct2ndStepback to summary
public void construct2ndStep(Node node, Object data)

Implements org.yaml.snakeyaml.constructor.Construct.construct2ndStep.

Doc from org.yaml.snakeyaml.constructor.Construct.construct2ndStep.

Apply the second step when constructing recursive structures. Because the instance is already created it can assign a reference to itself.

Parameters
node:Node

composed Node

data:Object

the instance constructed earlier by construct(Node node) for the provided Node

Annotations
@Override
@SuppressWarnings:unchecked
org.yaml.snakeyaml.constructor back to summary

public Class SafeConstructor.ConstructYamlSet

extends Object
implements Construct
Class Inheritance
  • java.lang.Object
  • org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlSet
All Implemented Interfaces
org.yaml.snakeyaml.constructor.Construct

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
public void
construct2ndStep(Node
composed Node
node
,
Object
the instance constructed earlier by construct(Node node) for the provided Node
object
)

Implements org.yaml.snakeyaml.constructor.Construct.construct2ndStep.

Apply the second step when constructing recursive structures.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ConstructYamlSetback to summary
public ConstructYamlSet()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
construct2ndStepback to summary
public void construct2ndStep(Node node, Object object)

Implements org.yaml.snakeyaml.constructor.Construct.construct2ndStep.

Doc from org.yaml.snakeyaml.constructor.Construct.construct2ndStep.

Apply the second step when constructing recursive structures. Because the instance is already created it can assign a reference to itself.

Parameters
node:Node

composed Node

object:Object

the instance constructed earlier by construct(Node node) for the provided Node

Annotations
@Override
@SuppressWarnings:unchecked
org.yaml.snakeyaml.constructor back to summary

public Class SafeConstructor.ConstructYamlStr

extends AbstractConstruct
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
Inherited from org.yaml.snakeyaml.constructor.AbstractConstruct:
construct2ndStep

Constructor Detail

ConstructYamlStrback to summary
public ConstructYamlStr()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
org.yaml.snakeyaml.constructor back to summary

public Class SafeConstructor.ConstructYamlTimestamp

extends AbstractConstruct
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Calendar

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
construct(Node
composed Node
node
)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.
public Calendar
Inherited from org.yaml.snakeyaml.constructor.AbstractConstruct:
construct2ndStep

Field Detail

calendarback to summary
private Calendar calendar

Constructor Detail

ConstructYamlTimestampback to summary
public ConstructYamlTimestamp()

Method Detail

constructback to summary
public Object construct(Node node)

Implements org.yaml.snakeyaml.constructor.Construct.construct.

Doc from org.yaml.snakeyaml.constructor.Construct.construct.

Construct a Java instance with all the properties injected when it is possible.

Parameters
node:Node

composed Node

Returns:Object

a complete Java instance

Annotations
@Override
getCalendarback to summary
public Calendar getCalendar()