public JSchema getExpectedSchema ( Map context ) { if ( expectedSchema != null ) return expectedSchema ; if ( expectedType == null ) return null ; expectedSchema = ( JSchema ) context . get ( expectedType ) ; if ( expectedSchema != null ) return expectedSchema ; expectedSchema = new JSchema ( expectedType , context ) ; return expectedSchema ; }
Retrieve the subschema corresponding to the expected type ( will be null iff expected type is null . Constructs the subschema if it doesn t already exist . The context argument guards against duplicate construction of schemas in the event that the definition is recursive .