xbean-blueprint/src/main/java/org/apache/xbean/blueprint/generator/NamespaceMapping.java [31:89]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class NamespaceMapping implements Comparable {
    private final String namespace;
    private final Set elements;
    private final Map elementsByName;
    private final ElementMapping rootElement;

    public NamespaceMapping(String namespace, Set elements, ElementMapping rootElement) {
        this.namespace = namespace;
        this.elements = Collections.unmodifiableSet(new TreeSet(elements));
        this.rootElement = rootElement;

        Map elementsByName = new HashMap();
        for (Iterator iterator = elements.iterator(); iterator.hasNext();) {
            ElementMapping elementMapping = (ElementMapping) iterator.next();
            elementsByName.put(elementMapping.getElementName(), elementMapping);
        }
        this.elementsByName = Collections.unmodifiableMap(elementsByName);
    }

    public String getNamespace() {
        return namespace;
    }

    public Set getElements() {
        return elements;
    }

    public ElementMapping getElement(String elementName) {
        return (ElementMapping) elementsByName.get(elementName);
    }

    public ElementMapping getRootElement() {
        return rootElement;
    }

    public int hashCode() {
        return namespace.hashCode();
    }

    public boolean equals(Object obj) {
        if (obj instanceof NamespaceMapping) {
            return namespace.equals(((NamespaceMapping) obj).namespace);
        }
        return false;
    }

    public int compareTo(Object obj) {
        return namespace.compareTo(((NamespaceMapping) obj).namespace);
    }

    private final HashMap checkedTypes = new HashMap();

    public boolean isSimpleType(Type type) {
        Boolean b = (Boolean) checkedTypes.get(type);
        if (b == null){
            b = Utils.isSimpleType(type)? Boolean.TRUE: Boolean.FALSE;
            checkedTypes.put(type, b);
        }
        return b.booleanValue();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



xbean-spring/src/main/java/org/apache/xbean/spring/generator/NamespaceMapping.java [31:89]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class NamespaceMapping implements Comparable {
    private final String namespace;
    private final Set elements;
    private final Map elementsByName;
    private final ElementMapping rootElement;

    public NamespaceMapping(String namespace, Set elements, ElementMapping rootElement) {
        this.namespace = namespace;
        this.elements = Collections.unmodifiableSet(new TreeSet(elements));
        this.rootElement = rootElement;

        Map elementsByName = new HashMap();
        for (Iterator iterator = elements.iterator(); iterator.hasNext();) {
            ElementMapping elementMapping = (ElementMapping) iterator.next();
            elementsByName.put(elementMapping.getElementName(), elementMapping);
        }
        this.elementsByName = Collections.unmodifiableMap(elementsByName);
    }

    public String getNamespace() {
        return namespace;
    }

    public Set getElements() {
        return elements;
    }

    public ElementMapping getElement(String elementName) {
        return (ElementMapping) elementsByName.get(elementName);
    }

    public ElementMapping getRootElement() {
        return rootElement;
    }

    public int hashCode() {
        return namespace.hashCode();
    }

    public boolean equals(Object obj) {
        if (obj instanceof NamespaceMapping) {
            return namespace.equals(((NamespaceMapping) obj).namespace);
        }
        return false;
    }

    public int compareTo(Object obj) {
        return namespace.compareTo(((NamespaceMapping) obj).namespace);
    }

    private final HashMap checkedTypes = new HashMap();

    public boolean isSimpleType(Type type) {
        Boolean b = (Boolean) checkedTypes.get(type);
        if (b == null){
            b = Utils.isSimpleType(type)? Boolean.TRUE: Boolean.FALSE;
            checkedTypes.put(type, b);
        }
        return b.booleanValue();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



