|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.appserv.management.base.MapCapableBase
public abstract class MapCapableBase
Base impl class.
Field Summary |
---|
Fields inherited from interface com.sun.appserv.management.base.MapCapable |
---|
MAP_CAPABLE_CLASS_NAME_KEY |
Constructor Summary | |
---|---|
protected |
MapCapableBase(Map<String,T> m,
String className)
|
protected |
MapCapableBase(String className)
|
Method Summary | ||
---|---|---|
Map<String,Serializable> |
asMap()
To be capable of being serialized and deserialized by generic clients, the following rules must be observed for the resulting Map. |
|
protected Serializable |
asMapHook(String key,
Serializable value)
|
|
protected void |
checkInJavaUtil(Object o)
|
|
protected void |
checkLegalObject(Object o)
|
|
protected void |
checkLegalObject(Object o,
boolean allowMapCapable)
We restrict the set of legal types to: OpenTypes Collection whose values meet these restrictions arrays whose values meet these restrictions Map whose keys and values meet these restrictions Throwable which are part of java or javax MapCapable whose Map meets these restrictions (assuming allowMapCapable is true) |
|
protected
|
checkValidType(Map<String,T> m,
String requiredType)
|
|
boolean |
equals(Object o)
|
|
protected boolean |
getboolean(String key)
|
|
protected Boolean |
getBoolean(String key)
|
|
protected Byte |
getByte(String key)
|
|
protected Serializable |
getField(String key)
|
|
protected File |
getFile(String key)
|
|
protected Integer |
getInteger(String key)
|
|
protected Map<String,Serializable> |
getMap(String key)
|
|
String |
getMapClassName()
Return the type name which will be paired with MAP_CAPABLE_CLASS_NAME_KEY. |
|
protected Serializable |
getObject(String key)
|
|
protected String |
getString(String key)
|
|
protected String[] |
getStringArray(String key)
|
|
int |
hashCode()
|
|
protected void |
illegalObject(Object o)
|
|
void |
makeImmutable()
Make this Object immutable. |
|
protected
|
putAll(Map<String,T> m)
Add fields one-by-one so we can check compliance with OpenTypes |
|
void |
putField(String key,
Serializable value)
Add a field to the object. |
|
protected Serializable |
putFieldHook(String key,
Serializable value)
|
|
String |
toString()
|
|
protected abstract boolean |
validate()
Return true if internal state is valid, false otherwise. |
|
protected boolean |
validateNullOrOfType(String key,
Class<?> theClass)
|
|
protected void |
validateThrow()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected MapCapableBase(String className)
protected MapCapableBase(Map<String,T> m, String className)
Method Detail |
---|
public int hashCode()
hashCode
in class Object
protected <T extends Serializable> void checkValidType(Map<String,T> m, String requiredType)
protected abstract boolean validate()
public String getMapClassName()
getMapClassName
in interface MapCapable
protected void illegalObject(Object o)
protected void checkInJavaUtil(Object o)
protected final void checkLegalObject(Object o, boolean allowMapCapable)
protected final void checkLegalObject(Object o)
protected boolean validateNullOrOfType(String key, Class<?> theClass)
protected final void validateThrow()
protected Serializable asMapHook(String key, Serializable value)
public final Map<String,Serializable> asMap()
MapCapable
The Map itself and any items it references, directly or indirectly must be of a class of one of the following:
asMap
in interface MapCapable
public void makeImmutable()
public void putField(String key, Serializable value)
protected Serializable putFieldHook(String key, Serializable value)
protected <T extends Serializable> void putAll(Map<String,T> m)
protected Serializable getField(String key)
protected final Serializable getObject(String key)
protected final String getString(String key)
protected final String[] getStringArray(String key)
protected final Boolean getBoolean(String key)
protected final Byte getByte(String key)
protected final boolean getboolean(String key)
protected final Integer getInteger(String key)
protected final Map<String,Serializable> getMap(String key)
protected final File getFile(String key)
public boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2006 Sun Microsystems, Inc. All rights reserved.