/*package*/ void fillAttributes(XMLStreamReader in) { for (int i = in.getAttributeCount() - 1; i >= 0; i--) { String n = in.getAttributeLocalName(i); if (model.attributes.containsKey(n)) { if (attributes == null) attributes = new HashMap<String, String>(); attributes.put(n, in.getAttributeValue(i)); } } if (attributes == null) attributes = Collections.emptyMap(); }
protected void _resolve() { _resolveBindings(_contextClass); // finally: may have root level type info too if (_contextType != null) { int count = _contextType.containedTypeCount(); if (count > 0) { if (_bindings == null) { _bindings = new LinkedHashMap<String, JavaType>(); } for (int i = 0; i < count; ++i) { String name = _contextType.containedTypeName(i); JavaType type = _contextType.containedType(i); _bindings.put(name, type); } } } // nothing bound? mark with empty map to prevent further calls if (_bindings == null) { _bindings = Collections.emptyMap(); } }
@Nonnull Map<Class<?>, byte[]> getRedefinedClasses() { return redefinedClasses.isEmpty() ? Collections.<Class<?>, byte[]>emptyMap() : new HashMap<Class<?>, byte[]>(redefinedClasses); }