|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.ws.commons.schema.utils.CollectionFactory
public final class CollectionFactory
There are many collections of XML Schema objects inside XmlSchema. This class provides consistent construction to centralize policy for thread synchronization and the like.
Method Summary | ||
---|---|---|
static void |
clearProtection()
|
|
static
|
getList(Class<T> type)
|
|
static
|
getProtectedList(List<T> list)
Call this to obtain a list to return from a public API where the caller is not supposed to modify the list. |
|
static
|
getProtectedMap(Map<K,V> map)
Call this to obtain a map to return from a public API where the caller is not supposed to modify the map. |
|
static
|
getSet(Class<T> type)
|
|
static void |
setProtected(boolean b)
Turns on or off protection of collections for this thread. |
|
static void |
withSchemaModifiable(Runnable action)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> List<T> getList(Class<T> type)
public static <T> Set<T> getSet(Class<T> type)
public static void setProtected(boolean b)
b
- public static void clearProtection()
public static <T> List<T> getProtectedList(List<T> list)
T
- Generic parameter type of the list.list
- the list.
public static <K,V> Map<K,V> getProtectedMap(Map<K,V> map)
K
- key typeV
- value typemap
- the map.
public static void withSchemaModifiable(Runnable action)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |