public class DGuiClassData extends GuiClassData
Currently, we only really use the class name to processor mapping at this time.
Custom class to type mapping is stored in "custom_java_objects_map.dat".
Custom types to library mapping is stored in "custom_object_types_map.dat".
FEB 07, 2013 (Lei Wang) Modify to let it be a subclass of org.safs.GuiClassData.
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
ALT_NAME_TYPES |
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_ANDROID_CLASS_TYPE
default type: "View"
|
static java.lang.String |
DEFAULT_ANDROID_OBJECT_TYPE
default library name: "View"
|
static java.lang.String |
DEFAULT_JAVA_OBJECTS_MAP |
static java.lang.String |
DEFAULT_OBJECT_TYPES_MAP |
static java.lang.String[] |
POPUP_MENU_CLASSES |
(package private) DSAFSTestRunner |
testrunner
Used to get at Android objects via Solo or OS Widgets and Views
|
static java.lang.String[] |
TOOLTIP_CONTAINER_TYPES |
classassigns, classesmap, classtypesmap, DEFAULT_CLASS_TYPE, DEFAULT_OBJECT_TYPE, DEFAULT_TYPE_SEPARATOR
Constructor and Description |
---|
DGuiClassData(DSAFSTestRunner testrunner) |
Modifier and Type | Method and Description |
---|---|
protected void |
debug(java.lang.String message) |
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 processor key 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).
|
java.lang.String |
getObjectClassType(java.lang.Object theObject)
Return a type for an object.
|
static boolean |
isAltNameType(java.lang.String type) |
static boolean |
isContainerType(java.lang.String mappedClassType) |
static boolean |
isPopupMenuClass(java.lang.String classname) |
static boolean |
isToolTipContainerType(java.lang.String mappedClassType) |
void |
loadMappingFile() |
void |
setSAFSTestRunner(DSAFSTestRunner _testrunner)
Must be set prior to calling debug or any of the static "get" functions.
|
classmap, classtypeContainsClassType, deduceOneClassType, getResourceURL, getTypesAsArray, getUniversalResourceURL, isAssignableFrom, isMatched, isMatchedType, 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_ANDROID_CLASS_TYPE
public static final java.lang.String DEFAULT_ANDROID_OBJECT_TYPE
DSAFSTestRunner testrunner
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
public DGuiClassData(DSAFSTestRunner testrunner)
public void setSAFSTestRunner(DSAFSTestRunner _testrunner)
_testrunner
- protected void debug(java.lang.String message)
public void loadMappingFile()
public java.lang.String getMappedClassType(java.lang.String classname, java.lang.Object theObject)
getMappedClassType
in class GuiClassData
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.
This can be a comma-separated list of possible class type matches.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.
getMappedClassType
in class GuiClassData
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.public static java.lang.String getGenericObjectType(java.lang.String classType)
GuiClassData.getGenericObjectType(String)
public java.lang.String getObjectClassType(java.lang.Object theObject)
Return a type for an object.
The type is defined in file DEFAULT_JAVA_OBJECTS_MAP
.dat
For one class, sometimes it can be mapped to multiple types, a string separated by
. This method will return one of them.
getMappedClassType(String, Object)
,
GuiClassData.deduceOneClassType(String, String)
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)
Copyright © SAS Institute. All Rights Reserved.