org.mule.common.metadata.parser.json
Class SchemaEnv

java.lang.Object
  extended by org.mule.common.metadata.parser.json.SchemaEnv

public class SchemaEnv
extends Object


Constructor Summary
SchemaEnv()
           
SchemaEnv(org.json.JSONObject contextJsonObject, URL contextJsonURL)
           
SchemaEnv(SchemaEnv p)
           
SchemaEnv(SchemaEnv p, org.json.JSONObject contextJsonObject)
           
 
Method Summary
 void addType(String name, JSONType t)
           
 boolean containsType(String name)
           
 JSONType evaluate(Object obj)
          Primary entry point to the JSONType parsing framework.
 org.json.JSONObject getContextJsonObject()
           
 URL getContextJsonURL()
           
 SchemaEnv getParent()
           
 JSONType lookupType(String name)
           
 Iterator<String> names()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaEnv

public SchemaEnv()

SchemaEnv

public SchemaEnv(SchemaEnv p)

SchemaEnv

public SchemaEnv(SchemaEnv p,
                 org.json.JSONObject contextJsonObject)

SchemaEnv

public SchemaEnv(org.json.JSONObject contextJsonObject,
                 URL contextJsonURL)
Method Detail

getContextJsonObject

public org.json.JSONObject getContextJsonObject()

lookupType

public JSONType lookupType(String name)

evaluate

public JSONType evaluate(Object obj)
                  throws SchemaException
Primary entry point to the JSONType parsing framework. This method builds JSONType object from the given argument, relative to the bindings in this environment. String objects in the appropriate places are looked up and converted to the corresponding bound JSONType objects.

Everything else is recursively evaluated, by type.

Parameters:
obj - The schema expression, either a String or a JSONObject.
Returns:
The JSONType object corresponding to the given schema expression.
Throws:
SchemaException
IllegalArgumentException - if the supplied argument is null, or if it is not of the correct type.

addType

public void addType(String name,
                    JSONType t)

containsType

public boolean containsType(String name)

names

public Iterator<String> names()

getParent

public SchemaEnv getParent()

getContextJsonURL

public URL getContextJsonURL()


Copyright © 2015 MuleSoft, Inc.. All rights reserved.