com.sun.tools.xjc.model
Class CCustomizations

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<CPluginCustomization>
              extended by com.sun.tools.xjc.model.CCustomizations
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<CPluginCustomization>, java.util.Collection<CPluginCustomization>, java.util.List<CPluginCustomization>, java.util.RandomAccess

public final class CCustomizations
extends java.util.ArrayList<CPluginCustomization>

Represents the list of CPluginCustomizations attached to a JAXB model component.

When Plugins register the customization namespace URIs through Plugin.getCustomizationURIs(), XJC will treat those URIs just like XJC's own extension "http://java.sun.com/xml/ns/xjc" and make them available as DOM nodes through CPluginCustomization. A Plugin can then access this information to change its behavior.

See Also:
Serialized Form

Field Summary
static CCustomizations EMPTY
          Convenient singleton instance that represents an empty CCustomizations.
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CCustomizations()
           
CCustomizations(java.util.Collection<? extends CPluginCustomization> cPluginCustomizations)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 CPluginCustomization find(java.lang.String nsUri)
          Finds the first CPluginCustomization that belongs to the given namespace URI.
 CPluginCustomization find(java.lang.String nsUri, java.lang.String localName)
          Finds the first CPluginCustomization that belongs to the given namespace URI and the local name.
 CCustomizable getOwner()
          Gets the model component that carries this customization.
 int hashCode()
           
static CCustomizations merge(CCustomizations lhs, CCustomizations rhs)
          Merges two CCustomizations objects into one.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractCollection
containsAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll
 

Field Detail

EMPTY

public static final CCustomizations EMPTY
Convenient singleton instance that represents an empty CCustomizations.

Constructor Detail

CCustomizations

public CCustomizations()

CCustomizations

public CCustomizations(java.util.Collection<? extends CPluginCustomization> cPluginCustomizations)
Method Detail

getOwner

public CCustomizable getOwner()
Gets the model component that carries this customization.

Returns:
never null.

find

public CPluginCustomization find(java.lang.String nsUri)
Finds the first CPluginCustomization that belongs to the given namespace URI.

Returns:
null if not found

find

public CPluginCustomization find(java.lang.String nsUri,
                                 java.lang.String localName)
Finds the first CPluginCustomization that belongs to the given namespace URI and the local name.

Returns:
null if not found

merge

public static CCustomizations merge(CCustomizations lhs,
                                    CCustomizations rhs)
Merges two CCustomizations objects into one.


equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Collection<CPluginCustomization>
Specified by:
equals in interface java.util.List<CPluginCustomization>
Overrides:
equals in class java.util.AbstractList<CPluginCustomization>

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Collection<CPluginCustomization>
Specified by:
hashCode in interface java.util.List<CPluginCustomization>
Overrides:
hashCode in class java.util.AbstractList<CPluginCustomization>