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

java.lang.Object
  extended by org.mule.common.metadata.parser.json.AbstractType
      extended by org.mule.common.metadata.parser.json.JSONObjectType
All Implemented Interfaces:
JSONType

public class JSONObjectType
extends AbstractType

Author:
Timothy Danford

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.mule.common.metadata.parser.json.JSONType
JSONType.BooleanType, JSONType.DoubleType, JSONType.Empty, JSONType.Everything, JSONType.IntegerType, JSONType.NumberType, JSONType.StringType
 
Constructor Summary
JSONObjectType(SchemaEnv env, org.json.JSONObject obj)
           
 
Method Summary
 boolean contains(Object obj)
          The central method of JSONType; the type encompasses the values for which contains returns true.
 String explain(Object obj)
          Returns a non-null String explanation, suitable for display to a user, explaining why the given object fails to conform to the JSONType's contains method.
 String getDescription()
           
 String getId()
           
 String getName()
           
 String[] getProperties()
           
 JSONType getPropertyType(String propName)
           
 boolean isJSONArray()
           
 boolean isJSONObject()
           
 boolean isJSONPointer()
           
 boolean isJSONPrimitive()
           
 void putInEnv(SchemaEnv newEnv)
           
 void setId(String id)
           
 
Methods inherited from class org.mule.common.metadata.parser.json.AbstractType
isOptional
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONObjectType

public JSONObjectType(SchemaEnv env,
                      org.json.JSONObject obj)
               throws SchemaException
Throws:
SchemaException
Method Detail

putInEnv

public void putInEnv(SchemaEnv newEnv)

contains

public boolean contains(Object obj)
Description copied from interface: JSONType
The central method of JSONType; the type encompasses the values for which contains returns true.

Specified by:
contains in interface JSONType
Specified by:
contains in class AbstractType
Returns:
trueif the given Object satisfies the type, false otherwise.

explain

public String explain(Object obj)
Description copied from interface: JSONType
Returns a non-null String explanation, suitable for display to a user, explaining why the given object fails to conform to the JSONType's contains method.

Specified by:
explain in interface JSONType
Overrides:
explain in class AbstractType
Returns:
an explanatory string if contains(arg) is false, or null if contains(arg) is true.

getName

public String getName()

getDescription

public String getDescription()

getProperties

public String[] getProperties()

getPropertyType

public JSONType getPropertyType(String propName)

isJSONPrimitive

public boolean isJSONPrimitive()

isJSONArray

public boolean isJSONArray()

isJSONObject

public boolean isJSONObject()

isJSONPointer

public boolean isJSONPointer()

getId

public String getId()

setId

public void setId(String id)


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