public class GuiClassData
extends java.lang.Object
Custom class to type mapping is stored in "CustomJavaObjectsMap.dat".
Custom types to library mapping is stored in "CustomObjectTypesMap.dat".
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
ALT_NAME_TYPES |
protected static java.util.Hashtable |
classassigns |
protected static java.util.Properties |
classesmap |
protected static java.util.Properties |
classtypesmap |
static java.lang.String[] |
CONTAINER_TYPES |
static java.lang.String |
CUSTOM_JAVA_OBJECTS_MAP |
static java.lang.String |
CUSTOM_OBJECT_TYPES_MAP |
static java.lang.String |
DEFAULT_CLASS_TYPE |
static java.lang.String |
DEFAULT_JAVA_OBJECTS_MAP |
static java.lang.String |
DEFAULT_OBJECT_TYPE |
static java.lang.String |
DEFAULT_OBJECT_TYPES_MAP |
static java.lang.String |
DEFAULT_TYPE_SEPARATOR |
static java.lang.String[] |
POPUP_MENU_CLASSES |
static java.lang.String[] |
TOOLTIP_CONTAINER_TYPES |
Constructor and Description |
---|
GuiClassData() |
Modifier and Type | Method and Description |
---|---|
static java.util.Properties |
classmap() |
protected static boolean |
classtypeContainsClassType(java.lang.String classtypes,
java.lang.String atype)
See if the comma-separated list of possible class types contains the one type
we are looking for.
|
static java.lang.String |
deduceOneClassType(java.lang.String _domain,
java.lang.String _type)
GuiClassData supports multiple 'types' for each class.
|
static java.lang.String |
getGenericObjectType(java.lang.String classType)
Returns the case-sensitive, generic object type for the given classType.
|
java.lang.String |
getMappedClassType(java.lang.String classname,
java.lang.Object theObject)
Retrieves the class Type we have stored for the provided class name (if any).
|
java.lang.String |
getMappedClassType(java.lang.String classname,
java.lang.Object theObject,
boolean recursive,
boolean allowGeneric)
Retrieves the class Type we have stored for the provided class name (if any).
|
protected static java.net.URL |
getResourceURL(java.lang.Class clazz,
java.lang.String aresource)
Attempt to locate the URL of a resource.
|
static java.lang.String[] |
getTypesAsArray(java.lang.String _type)
GuiClassData supports multiple 'types' for each class.
|
static java.net.URL |
getUniversalResourceURL(java.lang.Class clazz,
java.lang.String aresource)
Attempt to locate the URL of a resource.
|
static boolean |
isAltNameType(java.lang.String type) |
boolean |
isAssignableFrom(java.lang.String soughtType,
java.lang.String soughtClass,
java.lang.Object theObject)
See if our object is a subclass of a known class type.
|
static boolean |
isContainerType(java.lang.String mappedClassType) |
boolean |
isMatched(java.lang.String soughtType,
java.lang.String soughtClass,
java.lang.Object theObject)
Subclasses should override this to insure proper invocation of the overridden
functions.
This routine merely calls: |
static boolean |
isMatchedType(java.lang.String soughtType,
java.lang.String soughtClass)
Check if our soughtClass is equivalent to a known class type.
|
static boolean |
isPopupMenuClass(java.lang.String classname) |
static boolean |
isToolTipContainerType(java.lang.String mappedClassType) |
static java.util.Properties |
typesmap() |
public static final java.lang.String DEFAULT_JAVA_OBJECTS_MAP
public static final java.lang.String DEFAULT_OBJECT_TYPES_MAP
public static final java.lang.String CUSTOM_JAVA_OBJECTS_MAP
public static final java.lang.String CUSTOM_OBJECT_TYPES_MAP
public static final java.lang.String DEFAULT_CLASS_TYPE
public static final java.lang.String DEFAULT_OBJECT_TYPE
public static final java.lang.String DEFAULT_TYPE_SEPARATOR
public static final java.lang.String[] CONTAINER_TYPES
public static final java.lang.String[] ALT_NAME_TYPES
public static final java.lang.String[] TOOLTIP_CONTAINER_TYPES
public static final java.lang.String[] POPUP_MENU_CLASSES
protected static java.util.Properties classesmap
protected static java.util.Properties classtypesmap
protected static java.util.Hashtable classassigns
public static java.net.URL getUniversalResourceURL(java.lang.Class clazz, java.lang.String aresource)
clazz
- -- Class associated with the resource -- mapping to the JAR or directory resource might be found.aresource
- -- generally, the filename of the resource.java.util.MissingResourceException
- if not foundAgentClassLoader.AgentClassLoader(String)
protected static java.net.URL getResourceURL(java.lang.Class clazz, java.lang.String aresource)
clazz
- -- Class associated with the resource -- mapping to the JAR or directory resource might be found.aresource
- -- generally, the filename of the resource.java.util.MissingResourceException
- if not foundgetUniversalResourceURL(Class, String)
,
AgentClassLoader.AgentClassLoader(String)
public static java.util.Properties typesmap()
public static java.util.Properties classmap()
public java.lang.String getMappedClassType(java.lang.String classname, java.lang.Object theObject)
Tool-dependent subclasses will most likely have to subclass this class and provide similar mechanisms for evaluating the class hierarchy.
classname
- the actual classname sought as a known class type.obj
- the object we are going to evaluate for "type"null
if no mapped type is found. The classtype may be
returned as a comma-separated list of all types supported for the class.getMappedClassType(String, Object, boolean, boolean)
public java.lang.String getMappedClassType(java.lang.String classname, java.lang.Object theObject, boolean recursive, boolean allowGeneric)
Tool-dependent subclasses will most likely have to subclass this class and provide similar mechanisms for evaluating the class hierarchy.
classname
- the actual classname sought as a known class type.obj
- the object we are going to evaluate for "type"recursive
- true to look for superclass Type matches. false for only a direct class=type match.allowGeneric
- true to allow Type=Generic if no match is found for the provided classname.
false -- no Generic Type will be returned if the classname does not map.null
if no mapped type is found. The classtype may be
returned as a comma-separated list of all types supported for the class.protected static boolean classtypeContainsClassType(java.lang.String classtypes, java.lang.String atype)
public static boolean isMatchedType(java.lang.String soughtType, java.lang.String soughtClass)
soughtType
- the Type= identifier we are seeking.soughtClass
- the actual classname we are trying to type match.true
if the class or a superclass is a mapped type.
false
if it is not.public boolean isAssignableFrom(java.lang.String soughtType, java.lang.String soughtClass, java.lang.Object theObject)
Tool-dependent subclasses will override this method to handle their unique object proxies.
soughtType
- the Type= identifier we are seeking.soughtClass
- the actual classname we are trying to type match.true
if the class or a superclass is a mapped type.
false
if it is not.public boolean isMatched(java.lang.String soughtType, java.lang.String soughtClass, java.lang.Object theObject)
isMatchingType - usually not overridden isAssignableFrom - usually overridden by tool-dependent subclasses.
public static java.lang.String getGenericObjectType(java.lang.String classType)
classType is also case-sensitive, so it should be used from getMappedClassType unmodified.
This object type is used to instance particular classes of Component Function libraries. A single library may handle several subtypes or even similar types in different domains (Web, Java, etc.)
classType
- getMappedClassType value. If a comma-separated list is
provided then we will only return the object type of the first item in the
list.
public static boolean isContainerType(java.lang.String mappedClassType)
public static boolean isPopupMenuClass(java.lang.String classname)
public static boolean isToolTipContainerType(java.lang.String mappedClassType)
public static boolean isAltNameType(java.lang.String type)
public static java.lang.String deduceOneClassType(java.lang.String _domain, java.lang.String _type)
_domain
- "Java", "Win", "Html", or "Java;Html;Flex" etc..._type
- potentially comma-separated list of possible types.
Must not be null.public static java.lang.String[] getTypesAsArray(java.lang.String _type)
_type
- potentially comma-separated list of types retrieved from getMappedClassType.
Must not be null.getMappedClassType(String, Object)
Copyright © SAS Institute. All Rights Reserved.