Package com.sun.tools.xjc.model
Class CCustomizations
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<CPluginCustomization>
-
- 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 ofCPluginCustomization
s attached to a JAXB model component.When
Plugin
s register the customization namespace URIs throughPlugin.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 throughCPluginCustomization
. APlugin
can then access this information to change its behavior.- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static CCustomizations
EMPTY
Convenient singleton instance that represents an emptyCCustomizations
.
-
Constructor Summary
Constructors Constructor Description CCustomizations()
CCustomizations(java.util.Collection<? extends CPluginCustomization> cPluginCustomizations)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
CPluginCustomization
find(java.lang.String nsUri)
Finds the firstCPluginCustomization
that belongs to the given namespace URI.CPluginCustomization
find(java.lang.String nsUri, java.lang.String localName)
Finds the firstCPluginCustomization
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 twoCCustomizations
objects into one.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Field Detail
-
EMPTY
public static final CCustomizations EMPTY
Convenient singleton instance that represents an emptyCCustomizations
.
-
-
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 firstCPluginCustomization
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 firstCPluginCustomization
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 twoCCustomizations
objects into one.
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfacejava.util.Collection<CPluginCustomization>
- Specified by:
equals
in interfacejava.util.List<CPluginCustomization>
- Overrides:
equals
in classjava.util.ArrayList<CPluginCustomization>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Collection<CPluginCustomization>
- Specified by:
hashCode
in interfacejava.util.List<CPluginCustomization>
- Overrides:
hashCode
in classjava.util.ArrayList<CPluginCustomization>
-
-