Package flexjson.locators

Examples of flexjson.locators.StaticClassLocator


        pathFactories.put( Path.parse(path), new ClassLocatorObjectFactory( locator ) );
        return this;
    }

    public JSONDeserializer<T> use( String path, Class clazz ) {
        return use( path, new StaticClassLocator(clazz) );
    }
View Full Code Here


        map.put("home", home );
        map.put("work", work );

        map.put("phones", createPhoneMap(phones) );

        ObjectBinder binder = new ObjectBinder().use(Path.parse("phones.values"), new ClassLocatorObjectFactory( new StaticClassLocator(Phone.class) ) );
        Person person = (Person)binder.bind( map );

        assertTrue( "Make sure our array has stuff in it.", !person.getPhones().isEmpty() );
        assertEquals( 3, person.getPhones().size() );
        for( int i = 0; i < phones.size(); i++ ) {
View Full Code Here

    return this;
  }

  public JSONDeserializer<T> use(String path, Class clazz)
  {
    return use(path, new StaticClassLocator(clazz));
  }
View Full Code Here

TOP

Related Classes of flexjson.locators.StaticClassLocator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.