Class WTIntrospector

java.lang.Object
wt.introspection.WTIntrospector

public class WTIntrospector extends Object
WTIntrospector is a factory for class info objects.

Supported API: true

Extendable: false
See Also:
  • Field Details

    • INFO_EXTENSION

      public static final String INFO_EXTENSION
      The extension used for serialized ClassInfo files.

      Supported API: true
      See Also:
    • MODEL_RESOURCE_SUFFIX

      public static final String MODEL_RESOURCE_SUFFIX
      The suffix used for resource files related to modeled information.

      Supported API: true
      See Also:
    • STEREOTYPE

      public static final String STEREOTYPE
      Key to access the Stereotype from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • DERIVED

      public static final String DERIVED
      Key to access the Derived setting from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • PERSISTENT

      public static final String PERSISTENT
      Key to access the Persistence setting from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • QUERY_NAME

      public static final String QUERY_NAME
      Key to access the Query Name from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • STRING_CASE

      public static final String STRING_CASE
      Key to access the StringCase setting (as a wt.util.CaseKind) from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • INITIAL_VALUE

      public static final String INITIAL_VALUE
      Key to access the Initial Value setting from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • REQUIRED

      public static final String REQUIRED
      Key to access the Required setting from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • LOWER_LIMIT

      public static final String LOWER_LIMIT
      Key to access the Lower Limit from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • UPPER_LIMIT

      public static final String UPPER_LIMIT
      Key to access the Upper Limit from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • UPDATEABLE

      public static final String UPDATEABLE
      Key to access the Updateable setting from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • CHANGEABLE

      public static final String CHANGEABLE
      Key to access the Changeable setting (as a wt.introspection.ChangeableKind) from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • VALUE_SET_METHOD

      public static final String VALUE_SET_METHOD
      Key to access the Method object, that returns the valid value set, from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • CONSTRAINED_TYPE

      public static final String CONSTRAINED_TYPE
      Key to access the ConstrainedType (as a String), if it is constrained, from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • DEFINED_AS

      public static final String DEFINED_AS
      Key to access the Fully Qualified Name of the Property, as it was defined (modeled).

      Supported API: true
      See Also:
    • LOCALIZABLE

      public static final String LOCALIZABLE
      Key to access the Localizable setting from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • MODELED_PERSISTENT_TYPE

      public static final String MODELED_PERSISTENT_TYPE
      Key to access the ColumnType from a PropertyDescriptor obtained from a ClassInfo.

      Supported API: true
      See Also:
    • OBJECT_NAME

      public static final String OBJECT_NAME
      Key to access the datastore ObjectName extended value from a ClassInfo.

      Supported API: true
      See Also:
    • ORACLE_OPTIONS

      public static final String ORACLE_OPTIONS
      Key to access the Oracle Options extended value from a ClassInfo.

      Supported API: true
      See Also:
    • SQL_SERVER_OPTIONS

      public static final String SQL_SERVER_OPTIONS
      Key to access the SQLServer Options extended value from a ClassInfo.

      Supported API: true
      See Also:
    • ARRAY_TYPE

      public static final String ARRAY_TYPE
      Key to access the Array ObjectType extended value from a ClassInfo.

      Supported API: true
      See Also:
    • SEED

      public static final String SEED
      Key to access the Sequence Seed extended value from a ClassInfo.

      Supported API: true
      See Also:
    • INCREMENT

      public static final String INCREMENT
      Key to access the Sequence Increment extended value from a ClassInfo.

      Supported API: true
      See Also:
  • Method Details

    • getClassInfo

      public static ClassInfo getClassInfo(Class aClass) throws WTIntrospectionException
      Gets class meta info.

      Supported API: true
      Parameters:
      aClass - is the target class
      Returns:
      the ClassInfo instance for the requested class
      Throws:
      WTIntrospectionException - if class info cannot be loaded
    • getClassInfo

      public static ClassInfo getClassInfo(String aClassname) throws WTIntrospectionException
      Gets class meta info.

      Supported API: true
      Parameters:
      aClassname - is the full qualified name of the target class
      Returns:
      the ClassInfo instance for the requested class
      Throws:
      WTIntrospectionException - if class info cannot be loaded
    • getClassInfo

      public static ClassInfo getClassInfo(String aClassname, String dir) throws WTIntrospectionException
      Gets class meta info.

      Supported API: true
      Parameters:
      aClassname - is the full qualified name of the target class
      dir - is the root directory under which ClassInfo's are located
      Returns:
      the ClassInfo instance for the requested class
      Throws:
      WTIntrospectionException - if class info cannot be loaded
    • getBaseTableInfo

      public static wt.introspection.BaseTableInfo getBaseTableInfo(String tablename) throws WTIntrospectionException
      Gets table meta info.

      Supported API: true
      Parameters:
      tablename - is the name of the table
      Returns:
      the BaseTableInfo instance for the requested table
      Throws:
      WTIntrospectionException - if table info cannot be loaded
    • getClassInfoByAttribute

      public static ClassInfo getClassInfoByAttribute(String attribute) throws WTIntrospectionException
      Gets class meta info.

      Supported API: true
      Parameters:
      attribute - is a fully qualified attribute name
      Returns:
      the ClassInfo instance for the class holding this attribute
      Throws:
      WTIntrospectionException - if class info cannot be loaded
    • getLinkInfo

      public static LinkInfo getLinkInfo(Class aClass) throws WTIntrospectionException
      Gets class meta info.

      Supported API: true
      Parameters:
      aClass - is the target link class
      Returns:
      the LinkInfo instance for the requested class
      Throws:
      WTIntrospectionException - if class info cannot be loaded
    • getLinkInfo

      public static LinkInfo getLinkInfo(String aClassname) throws WTIntrospectionException
      Gets link class meta info.

      Supported API: true
      Parameters:
      aClassname - is the full qualified name of the target class
      Returns:
      the LinkInfo instance for the requested class
      Throws:
      WTIntrospectionException - if class info cannot be loaded
    • getLinkInfo

      public static LinkInfo getLinkInfo(String aClassname, String dir) throws WTIntrospectionException
      Gets link class meta info.

      Supported API: true
      Parameters:
      aClassname - is the full qualified name of the target class
      dir - is the root directory under which ClassInfo's are located
      Returns:
      the LinkInfo instance for the requested class
      Throws:
      WTIntrospectionException - if class info cannot be loaded
    • getValidType

      public static Class getValidType(PropertyDescriptor pd) throws WTIntrospectionException
      Get the valid type for a PropertyDescriptor. It will use the CONSTRAINED_TYPE if one exists, otherwise it will use the propertyType.

      Supported API: true
      Parameters:
      pd - The target PropertyDescriptor.
      Returns:
      The type of Class that is valid for the PropertyDescriptor.
      Throws:
      WTIntrospectionException - if fails to construct new PropertyDescriptor.
    • getValidTypeName

      public static String getValidTypeName(PropertyDescriptor pd) throws WTIntrospectionException
      Get the name of the valid type for a PropertyDescriptor. It will use the CONSTRAINED_TYPE if one exists, otherwise it will use the propertyType.

      Supported API: true
      Parameters:
      pd - The target PropertyDescriptor.
      Returns:
      The name of the type that is valid for the PropertyDescriptor.
      Throws:
      WTIntrospectionException - if fails to construct new PropertyDescriptor.
    • getQualifiedName

      public static String getQualifiedName(PropertyDescriptor pd)
      Get the qualifed name (classname.name) of the PropertyDescriptor

      Supported API: true
      Parameters:
      pd - The target PropertyDescriptor.
      Returns:
      The qualifed name (classname.name) of the PropertyDescriptor.
      Throws:
      WTIntrospectionException - if fails to construct new PropertyDescriptor.