|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.introspection.ClassInfo
ClassInfo is the class for providing class meta-data
There will be an instance of this class for each modeled
business class that is installed.
Supported API: true
Extendable: false
WTIntrospector
,
LinkInfo
,
Serialized FormConstructor Summary | |
ClassInfo()
Constructor. |
|
ClassInfo(String[] theInterfaces,
String parent_name,
String class_name,
String concrete_classname,
DatabaseInfo database_info,
boolean persistentFlag,
AttributeDescriptor[] attrs,
String standard_icon,
String open_icon,
boolean isLocalizable,
DatastoreElementType datastore_elem_type,
boolean isRemoveEventParticipant,
HashMap extended_values)
Constructor. |
Method Summary | |
private void |
accumulateDefaultExtensions(PropertyDescriptor pd)
|
private void |
accumulateDescendentInfosDirect(ArrayList accumulator,
String class_name,
boolean recurse)
Accumulate all direct descendent classes. |
private void |
accumulateDescendents(String class_name)
Accumulate all descendent ClassInfos. |
private void |
accumulateOtherRoles()
|
private void |
accumulateProperties()
|
private void |
accumulatePropertyExtensions(PropertyDescriptor[] property_descriptors)
|
private void |
addInfoRoles(ArrayList roles,
ClassInfo anotherInfo)
|
private PropertyDescriptor[] |
addPropertyDescriptors(PropertyDescriptor[] accumulator,
HashMap others)
|
private void |
addRole(ArrayList roles,
RoleDescriptor newRole)
|
private void |
addRole(ArrayList roles,
RoleDescriptor newRole,
int add_index)
|
boolean |
equals(Object obj)
Compares two objects for equality. |
ColumnDescriptor[] |
getAttributeColumnDescriptors(String name)
Return all the ColumnDescriptor's (if any) associated with the named attribute. |
Object[] |
getAttributeValueSet(String name)
Gets the set of valid values for the named attribute. |
Class |
getBusinessClass()
Gets the business class represented by this info instance. |
String |
getClassname()
Gets the class name of the business class represented by this info instance. |
Class |
getConcreteClass()
Gets the instantiable class represented by this info instance. |
static EnumeratedType |
getConstrainedEnum(Class theClass,
String attribute_name,
String internal_value)
Gets the EnumeratedType instance for an attribute of a class, given an internal value for the EnumeratedType instance. |
DatabaseInfo |
getDatabaseInfo()
Gets the DatabaseInfo for this class. |
DatastoreElementType |
getDatastoreElementType()
Gets the DatastoreElementType of the class. |
ClassInfo[] |
getDescendentInfos()
Gets an array of ClassInfos of all the descendent classes. |
ClassInfo[] |
getDirectDescendentInfos()
Gets the direct descendent class infos. |
String |
getDisplayName()
Gets the display name for the class. |
String |
getDisplayName(Locale locale)
Gets the display name for the class, for the specified locale. |
long |
getExternalizationVersionUID()
Gets the generated externalization UID, if it exists. |
private static int |
getIndex(String name,
PropertyDescriptor[] properties)
|
(package private) String[] |
getInterfaces()
|
String |
getOpenIcon()
Gets the fully qualified class name of the resource bundle for the open icon. |
RoleDescriptor |
getOtherSideRole(String name)
Gets a named RoleDescriptor, which is opposite of this class. |
RoleDescriptor |
getOtherSideRole(String name,
LinkInfo info)
Gets a named RoleDescriptor, for a particular association, which is opposite of this class. |
RoleDescriptor[] |
getOtherSideRoles()
Gets an array of RoleDescriptors, which are opposite instances of this class, in all of the associations, within which this class can participate. |
ClassInfo |
getParentClassInfo()
Gets the parent class info of the business class represented by this info instance. |
String |
getParentClassname()
Gets the name of the parent class of the business class represented by this info instance. |
ClassInfo[] |
getParentInterfaceInfos()
Gets the parent interface infos for the business class represented by this info instance. |
PropertyDescriptor |
getPropertyDescriptor(String name)
Gets a property descriptor for the named attribute of the class. |
private static PropertyDescriptor |
getPropertyDescriptor(String name,
PropertyDescriptor[] properties)
|
PropertyDescriptor[] |
getPropertyDescriptors()
Gets the array of property descriptors for the class. |
static String |
getPropertyDisplayName(PropertyDescriptor property,
Locale locale)
Gets the display name for the named property of the class, for the specified locale. |
static String |
getPropertyShortDescription(PropertyDescriptor property,
Locale locale)
Gets the display name for the property of the class, for the specified locale. |
PropertyDescriptor |
getReadPropertyDescriptor(String name)
Gets a read-only property descriptor for the named attribute of the class. |
private static Class |
getRootContainer(String name,
Class container)
|
Class |
getSerializableType()
Gets the type of serialization used by the class, if it is enabled. |
long |
getSerialVersionUID()
Gets the serialVersionUID for the class. |
String |
getStandardIcon()
Gets the fully qualified class name of the resource bundle for the standard icon. |
Object |
getValue(String attribute_name)
Retrieve a named attribute with this feature. |
boolean |
hasDisplayName()
Deprecated. |
protected boolean |
haveParentClass()
Supported API: false |
boolean |
isConcrete()
Gets the concrete status of this class. |
boolean |
isLocalizable()
Deprecated. |
boolean |
isPersistable()
Gets the persistable status of this class. |
boolean |
isRemoveEventParticipant()
Indicates if the persistence layer is required to dispatch Remove events for this class. |
private boolean |
isSuperclassOf(Class aClass)
Deprecated. Replaced by java.lang.Class.isAssignableFrom(Class) |
boolean |
isSuperclassOf(ClassInfo classInfo)
Answer whether class parents the supplied classInfo. |
(package private) static Class |
loadClass(String a_classname)
|
private void |
mergePropertyDescriptors(HashMap PDs,
ClassInfo anotherInfo)
|
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private void |
readMyRoles(ArrayList roles)
|
private boolean |
removeDuplicateRole(ArrayList roles,
int index,
RoleDescriptor newRole)
|
private String |
resourceLookup(String[] key,
Locale locale)
example: key = "DisplayName" classname = "wt.fc.PersistInfo" Supported API: false |
(package private) static String |
resourceLookup(String[] key,
String attribute,
Locale locale)
example: key = "DisplayName" attribute = "wt.fc.PersistInfo.createStamp" |
private static String |
resourceLookup(String resourceName,
String[] key,
String elementName,
Locale locale)
example: resourceName = "fcResource" key = "DisplayName" attribute = "PersistInfo.createStamp" locale = WTContext.getContext().getLocale() Supported API: false |
(package private) void |
setAbsoluteDir(String absolute_dir)
|
private void |
setIconDefault(int icon)
|
private String |
setIconName(ClassInfo info,
int icon)
|
private static void |
setPropertyLocalizables(PropertyDescriptor property)
|
LocalizableMessage |
toDisplayNameMessage()
Gets an object, which can be used to get a localized message for this class, having the request deferred to time or location where the locale may not be the same as the current locale. |
String |
toString()
Returns a string representation of the object. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String CLASSNAME
private static final String SIMPLE_CLASSNAME
public static final boolean DEBUG
private static final DebugWriter LOG
public static final long externalizationVersionUID
static final long serialVersionUID
private static final String RESOURCE
private String absoluteDir
static final String[] DISPLAY_NAME
static final String[] SHORT_DESCRIPTION
private static final int STANDARD_ICON
private static final int OPEN_ICON
private transient volatile ClassInfo[] myParentInterfaces
private transient ClassInfo myParentClass
private transient Class myBusinessClass
private transient Class myConcreteClass
private String concreteClassname
private String[] interfaces
private String parentClassname
private String classname
private DatabaseInfo dbInfo
private boolean persistable
private boolean removeEventParticipant
private String openIcon
private String standardIcon
private boolean localizable
private DatastoreElementType datastoreElementType
private HashMap extendedValues
private transient volatile PropertyDescriptor[] properties
private transient HashMap propertyCache
private transient HashMap readPropertyCache
private transient com.objectspace.jgl.OrderedMap attributeTable
private AttributeDescriptor[] myAttributes
private transient volatile RoleDescriptor[] otherSideRoles
private transient volatile ClassInfo[] allDescendentInfos
private transient volatile ClassInfo[] directDescendentInfos
private static final boolean RUNTIME_MODE
private static final boolean PD_RECURSE_INTERFACE
private static final Class EVOLVABLE
Constructor Detail |
public ClassInfo()
public ClassInfo(String[] theInterfaces, String parent_name, String class_name, String concrete_classname, DatabaseInfo database_info, boolean persistentFlag, AttributeDescriptor[] attrs, String standard_icon, String open_icon, boolean isLocalizable, DatastoreElementType datastore_elem_type, boolean isRemoveEventParticipant, HashMap extended_values)
Method Detail |
private void accumulateDefaultExtensions(PropertyDescriptor pd) throws WTIntrospectionException
WTIntrospectionException
private void accumulateDescendentInfosDirect(ArrayList accumulator, String class_name, boolean recurse) throws WTIntrospectionException
class_name
- - The fully qualified name of the class for which decendents will be gathered.
WTIntrospectionException
wt.introspection.ClassInfo#accumulateAll(String)
private void accumulateDescendents(String class_name) throws WTIntrospectionException
class_name
- - The fully qualified name of the class for which decendents will be gathered.
WTIntrospectionException
- if fails in any wayprivate void accumulateOtherRoles() throws WTIntrospectionException
WTIntrospectionException
private void accumulateProperties() throws WTIntrospectionException
WTIntrospectionException
private void accumulatePropertyExtensions(PropertyDescriptor[] property_descriptors) throws WTIntrospectionException
WTIntrospectionException
private void addInfoRoles(ArrayList roles, ClassInfo anotherInfo) throws WTIntrospectionException
WTIntrospectionException
private PropertyDescriptor[] addPropertyDescriptors(PropertyDescriptor[] accumulator, HashMap others) throws WTIntrospectionException
WTIntrospectionException
private void addRole(ArrayList roles, RoleDescriptor newRole) throws WTIntrospectionException
WTIntrospectionException
private void addRole(ArrayList roles, RoleDescriptor newRole, int add_index) throws WTIntrospectionException
WTIntrospectionException
private boolean removeDuplicateRole(ArrayList roles, int index, RoleDescriptor newRole) throws WTIntrospectionException
WTIntrospectionException
public boolean equals(Object obj)
obj
- the Object to compare with
public Object[] getAttributeValueSet(String name) throws WTIntrospectionException
WTIntrospectionException
public Class getBusinessClass() throws WTIntrospectionException
WTIntrospectionException
public String getClassname()
public Class getConcreteClass() throws WTIntrospectionException
WTIntrospectionException
public static EnumeratedType getConstrainedEnum(Class theClass, String attribute_name, String internal_value)
public DatabaseInfo getDatabaseInfo()
public ClassInfo[] getDescendentInfos() throws WTIntrospectionException
WTIntrospectionException
public ClassInfo[] getDirectDescendentInfos() throws WTIntrospectionException
WTException
- to be determined
WTIntrospectionException
public String getDisplayName()
getDisplayName(Locale)
public String getDisplayName(Locale locale)
public long getExternalizationVersionUID()
private static int getIndex(String name, PropertyDescriptor[] properties) throws WTIntrospectionException
WTIntrospectionException
String[] getInterfaces()
public String getOpenIcon() throws WTIntrospectionException
WTIntrospectionException
public RoleDescriptor getOtherSideRole(String name) throws WTIntrospectionException
WTIntrospection
- Exception
WTIntrospectionException
#getOtherSideRoles(String,LinkInfo)
public RoleDescriptor getOtherSideRole(String name, LinkInfo info) throws WTIntrospectionException
WTIntrospection
- Exception
WTIntrospectionException
public RoleDescriptor[] getOtherSideRoles() throws WTIntrospectionException
WTIntrospection
- Exception
WTIntrospectionException
public ClassInfo getParentClassInfo() throws WTIntrospectionException
WTIntrospectionException
public String getParentClassname()
public ClassInfo[] getParentInterfaceInfos() throws WTIntrospectionException
WTIntrospectionException
public PropertyDescriptor getPropertyDescriptor(String name) throws WTIntrospectionException
WTIntrospectionException
- if fails to load class or fails to locate named propertyprivate static PropertyDescriptor getPropertyDescriptor(String name, PropertyDescriptor[] properties) throws WTIntrospectionException
WTIntrospectionException
public PropertyDescriptor[] getPropertyDescriptors() throws WTIntrospectionException
WTIntrospectionException
- if fails to load class or bean info for classpublic static String getPropertyDisplayName(PropertyDescriptor property, Locale locale)
public static String getPropertyShortDescription(PropertyDescriptor property, Locale locale)
public PropertyDescriptor getReadPropertyDescriptor(String name) throws WTIntrospectionException
getPropertyDescriptor
, to avoid
the SecurityException that is thrown when reflecting on methods that are not public.
That is, when a property has a protected write method (setter).
WTIntrospectionException
- if fails to load class or fails to locate named propertyprivate static Class getRootContainer(String name, Class container) throws WTIntrospectionException
WTIntrospectionException
public Class getSerializableType()
public long getSerialVersionUID()
public String getStandardIcon() throws WTIntrospectionException
WTIntrospectionException
public boolean hasDisplayName()
protected boolean haveParentClass()
public boolean isConcrete()
public boolean isLocalizable()
public boolean isPersistable()
public DatastoreElementType getDatastoreElementType()
private boolean isSuperclassOf(Class aClass) throws WTIntrospectionException
WTIntrospectionException
Class
,
getBusinessClass()
,
isSuperclassOf(ClassInfo)
public boolean isSuperclassOf(ClassInfo classInfo) throws WTIntrospectionException
WTIntrospectionException
Class
,
getBusinessClass()
public ColumnDescriptor[] getAttributeColumnDescriptors(String name) throws WTIntrospectionException
WTIntrospectionException
ColumnDescriptor
static Class loadClass(String a_classname) throws WTIntrospectionException
WTIntrospectionException
private void mergePropertyDescriptors(HashMap PDs, ClassInfo anotherInfo) throws WTIntrospectionException
WTIntrospectionException
private void readMyRoles(ArrayList roles) throws WTIntrospectionException
WTIntrospectionException
static String resourceLookup(String[] key, String attribute, Locale locale)
private String resourceLookup(String[] key, Locale locale)
private static String resourceLookup(String resourceName, String[] key, String elementName, Locale locale)
void setAbsoluteDir(String absolute_dir)
private void setIconDefault(int icon) throws WTIntrospectionException
WTIntrospectionException
private String setIconName(ClassInfo info, int icon) throws WTIntrospectionException
WTIntrospectionException
private static void setPropertyLocalizables(PropertyDescriptor property)
public LocalizableMessage toDisplayNameMessage()
public String toString()
public Object getValue(String attribute_name)
attribute_name
- - The locale-independent name of the attribute
public boolean isRemoveEventParticipant()
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
- is an input stream
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
- is an output stream
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |