org.jvyamlb
Class SafeConstructorImpl

java.lang.Object
  extended by org.jvyamlb.BaseConstructorImpl
      extended by org.jvyamlb.SafeConstructorImpl
All Implemented Interfaces:
Constructor
Direct Known Subclasses:
ConstructorImpl

public class SafeConstructorImpl
extends BaseConstructorImpl

Author:
Ola Bini

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jvyamlb.BaseConstructorImpl
BaseConstructorImpl.YamlMultiAdapter
 
Nested classes/interfaces inherited from interface org.jvyamlb.Constructor
Constructor.RecursiveFixer, Constructor.YamlConstructor, Constructor.YamlMultiConstructor
 
Field Summary
private static java.util.Map BOOL_VALUES
           
private static java.lang.Double INF_VALUE_NEG
           
private static java.lang.Double INF_VALUE_POS
           
private static java.lang.Double NAN_VALUE
           
private static java.util.regex.Pattern TIMESTAMP_REGEXP
           
private static java.util.Map yamlConstructors
           
private static java.util.Map yamlMultiConstructors
           
private static java.util.Map yamlMultiRegexps
           
static java.util.regex.Pattern YMD_REGEXP
           
 
Fields inherited from class org.jvyamlb.BaseConstructorImpl
CONSTRUCT_MAPPING, CONSTRUCT_PRIMITIVE, CONSTRUCT_PRIVATE, CONSTRUCT_SCALAR, CONSTRUCT_SEQUENCE
 
Constructor Summary
SafeConstructorImpl(Composer composer)
           
 
Method Summary
static void addConstructor(java.lang.String tag, Constructor.YamlConstructor ctor)
           
static void addMultiConstructor(java.lang.String tagPrefix, Constructor.YamlMultiConstructor ctor)
           
static java.lang.Object constructJava(Constructor ctor, java.lang.String pref, Node node)
           
static java.lang.Object constructSpecializedMap(Constructor ctor, java.lang.String pref, Node node)
           
static java.lang.Object constructSpecializedSequence(Constructor ctor, java.lang.String pref, Node node)
           
static java.lang.Object constructUndefined(Constructor ctor, Node node)
           
static java.lang.Object constructYamlBinary(Constructor ctor, Node node)
           
static java.lang.Object constructYamlBool(Constructor ctor, Node node)
           
static java.lang.Object constructYamlFloat(Constructor ctor, Node node)
           
static java.lang.Object constructYamlInt(Constructor ctor, Node node)
           
static java.lang.Object constructYamlMap(Constructor ctor, Node node)
           
static java.lang.Object constructYamlNull(Constructor ctor, Node node)
           
static java.lang.Object constructYamlOmap(Constructor ctor, Node node)
           
static java.lang.Object constructYamlPairs(Constructor ctor, Node node)
           
static java.lang.Object constructYamlSeq(Constructor ctor, Node node)
           
static java.lang.Object constructYamlSet(Constructor ctor, Node node)
           
static java.lang.Object constructYamlStr(Constructor ctor, Node node)
           
static java.lang.Object constructYamlTimestamp(Constructor ctor, Node node)
           
private static java.lang.Object fixValue(java.lang.Object inp, java.lang.Class outp)
           
 Constructor.YamlConstructor getYamlConstructor(java.lang.Object key)
           
 Constructor.YamlMultiConstructor getYamlMultiConstructor(java.lang.Object key)
           
 java.util.regex.Pattern getYamlMultiRegexp(java.lang.Object key)
           
 java.util.Set getYamlMultiRegexps()
           
private static org.jruby.util.ByteList into(java.lang.String v)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.jvyamlb.BaseConstructorImpl
addFixer, checkData, constructDocument, constructMapping, constructObject, constructPairs, constructPrimitive, constructPrivateType, constructScalar, constructSequence, doRecursionFix, eachDocument, getData, getNullNode, iterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

yamlConstructors

private static final java.util.Map yamlConstructors

yamlMultiConstructors

private static final java.util.Map yamlMultiConstructors

yamlMultiRegexps

private static final java.util.Map yamlMultiRegexps

BOOL_VALUES

private static final java.util.Map BOOL_VALUES

TIMESTAMP_REGEXP

private static final java.util.regex.Pattern TIMESTAMP_REGEXP

YMD_REGEXP

public static final java.util.regex.Pattern YMD_REGEXP

INF_VALUE_POS

private static final java.lang.Double INF_VALUE_POS

INF_VALUE_NEG

private static final java.lang.Double INF_VALUE_NEG

NAN_VALUE

private static final java.lang.Double NAN_VALUE
Constructor Detail

SafeConstructorImpl

public SafeConstructorImpl(Composer composer)
Method Detail

getYamlConstructor

public Constructor.YamlConstructor getYamlConstructor(java.lang.Object key)
Overrides:
getYamlConstructor in class BaseConstructorImpl

getYamlMultiConstructor

public Constructor.YamlMultiConstructor getYamlMultiConstructor(java.lang.Object key)
Overrides:
getYamlMultiConstructor in class BaseConstructorImpl

getYamlMultiRegexp

public java.util.regex.Pattern getYamlMultiRegexp(java.lang.Object key)
Overrides:
getYamlMultiRegexp in class BaseConstructorImpl

getYamlMultiRegexps

public java.util.Set getYamlMultiRegexps()
Overrides:
getYamlMultiRegexps in class BaseConstructorImpl

addConstructor

public static void addConstructor(java.lang.String tag,
                                  Constructor.YamlConstructor ctor)

addMultiConstructor

public static void addMultiConstructor(java.lang.String tagPrefix,
                                       Constructor.YamlMultiConstructor ctor)

into

private static org.jruby.util.ByteList into(java.lang.String v)

constructYamlNull

public static java.lang.Object constructYamlNull(Constructor ctor,
                                                 Node node)

constructYamlBool

public static java.lang.Object constructYamlBool(Constructor ctor,
                                                 Node node)

constructYamlOmap

public static java.lang.Object constructYamlOmap(Constructor ctor,
                                                 Node node)

constructYamlPairs

public static java.lang.Object constructYamlPairs(Constructor ctor,
                                                  Node node)

constructYamlSet

public static java.lang.Object constructYamlSet(Constructor ctor,
                                                Node node)

constructYamlStr

public static java.lang.Object constructYamlStr(Constructor ctor,
                                                Node node)

constructYamlSeq

public static java.lang.Object constructYamlSeq(Constructor ctor,
                                                Node node)

constructYamlMap

public static java.lang.Object constructYamlMap(Constructor ctor,
                                                Node node)

constructUndefined

public static java.lang.Object constructUndefined(Constructor ctor,
                                                  Node node)

constructYamlTimestamp

public static java.lang.Object constructYamlTimestamp(Constructor ctor,
                                                      Node node)

constructYamlInt

public static java.lang.Object constructYamlInt(Constructor ctor,
                                                Node node)

constructYamlFloat

public static java.lang.Object constructYamlFloat(Constructor ctor,
                                                  Node node)

constructYamlBinary

public static java.lang.Object constructYamlBinary(Constructor ctor,
                                                   Node node)

constructSpecializedSequence

public static java.lang.Object constructSpecializedSequence(Constructor ctor,
                                                            java.lang.String pref,
                                                            Node node)

constructSpecializedMap

public static java.lang.Object constructSpecializedMap(Constructor ctor,
                                                       java.lang.String pref,
                                                       Node node)

fixValue

private static java.lang.Object fixValue(java.lang.Object inp,
                                         java.lang.Class outp)

constructJava

public static java.lang.Object constructJava(Constructor ctor,
                                             java.lang.String pref,
                                             Node node)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception