private boolean write(Type type, Object obj, NodeMap nodemap) throws Exception { type = lookup(type, obj); nodemap = (OutputNode) nodemap.getNode(); if (type != null) { type.write(nodemap, obj); return true; } else { return false; } }
public boolean write(Type type, Object value, NodeMap<OutputNode> node, Map map) throws Exception { Component component = type.getAnnotation(Component.class); if (component != null) { String name = component.name(); if (name != null) { node.put(KEY, name); } } return strategy.write(type, value, node, map); }
private Value read(Type type, NodeMap nodemap, Value value) throws Exception { Converter converter = lookup(type, value); nodemap = (InputNode) nodemap.getNode(); type = value; if (converter != null) { type = ((Type) (converter.read(nodemap))); if (value != null) { value.setValue(type); } type = new Reference(value, type); } return type; }
public Value read(Type type, NodeMap<InputNode> node, Map map) throws Exception { Component component = type.getAnnotation(Component.class); if (component != null) { String name = component.name(); InputNode value = node.get(KEY); if (!value.getValue().equals(name)) { throw new IllegalStateException( "Component name incorrect, expected '" + name + "' but was '" + value.getValue() + "'"); } } return strategy.read(type, node, map); }