All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.util.transforms
Class Transforms

    com.sas.util.transforms.Transforms

    public class Transforms

The Transforms class manages the list of registered transforms used by the property linking mechanism of the com.sas.LinkPropertiesInterface and com.sas.PropertyLinkAdaptor.

Field Summary
`protected static boolean` | `defaultTransformsRegistered` This flag is used by all public methods of this class to determine if the default transforms have already be registered.
`protected static java.util.Hashtable` | `inputClasses` inputClasses is a Hashtable which maintains a hash of Class objects to HashTables.

Constructor Summary
`Transforms()`

Method Summary
`static java.util.Enumeration` | `getRegisteredSourceClasses()` Gets all the source classes the have a transform registered to that type.
`static java.util.Enumeration` | `getRegisteredSourceClassesForTransform(com.sas.util.transforms.TransformInterface transform)` Gets all the source classes that the specifed transform is registered to.
`static java.util.Hashtable` | `getRegisteredSourceTransforms(java.lang.Class inputClass)` Get the registered transforms that have the specified type as source objects.
`static java.util.Hashtable` | `getRegisteredTargetTransforms(java.lang.Class targetClass)` Get the registered transforms that have the specified type as target objects.
`static com.sas.util.transforms.TransformInterface[]` | `getRegisteredTransforms()` Returns an array of unique registered transform objects.
`static boolean` | `isTransformable(java.lang.Class inputClass, java.lang.Class outputClass)` Check for a transformation from inputClass to outputClass from the pool of registered transformations.
`static boolean` | `isTransformable(java.lang.Object source, java.lang.String sourceProperty, java.lang.Object target, java.lang.String targetProperty)` Returns whether or not the specified source property can be transformed to the type of the specified target property.
`static com.sas.util.transforms.TransformInterface` | `lookupTransform(java.lang.Class inputClass, java.lang.Class outputClass)` Finds a transformation from inputClass to outputClass from the pool of registered transformations.
`static void` | `registerDefaultTransforms()` registerDefaultTransforms registers a set of default transforms so that there is a base set of transforms to use in linking properties.
`static void` | `registerTransform(java.lang.Class inputClass, java.lang.Class outputClass, com.sas.util.transforms.TransformInterface converterClass)` Registers a transformation (converterClass) from inputClass to outputClass.
`protected static void` | `registerTransformsForClasses(java.lang.Class[][] sourceClassLists, java.lang.Class destClass, com.sas.util.transforms.TransformInterface transform)` This is a helper method used to register transforms between the various Number subclasses.
`static void` | `unregisterTransform(java.lang.Class inputClass, java.lang.Class outputClass, com.sas.util.transforms.TransformInterface converterClass)` Unregisters a transformation (converterClass) from inputClass to outputClass.

Field Detail

### defaultTransformsRegistered

    protected static boolean defaultTransformsRegistered

  This flag is used by all public methods of this class to determine if the default transforms have already be registered. This allow lazy registration of the default transforms so that applications which do not use property linking will not have to pay the price for registering the transforms.

### inputClasses

    protected static java.util.Hashtable inputClasses

  inputClasses is a Hashtable which maintains a hash of Class objects to HashTables. These inner Hashtables contain a hash of Class objects to objects which implement the TransformInterface.

  See Also:
    `registerTransform(java.lang.Class, java.lang.Class, com.sas.util.transforms.TransformInterface)`, `unregisterTransform(java.lang.Class, java.lang.Class, com.sas.util.transforms.TransformInterface)`, `lookupTransform(java.lang.Class, java.lang.Class)`

Constructor Detail

### Transforms

    public Transforms()

Method Detail

### registerDefaultTransforms

    public static void registerDefaultTransforms()

  registerDefaultTransforms registers a set of default transforms so that there is a base set of transforms to use in linking properties.

### registerTransformsForClasses

    protected static void registerTransformsForClasses(java.lang.Class[][] sourceClassLists,
                                                       java.lang.Class destClass,
                                                       com.sas.util.transforms.TransformInterface transform)

  This is a helper method used to register transforms between the various Number subclasses.

### registerTransform

    public static void registerTransform(java.lang.Class inputClass,
                                         java.lang.Class outputClass,
                                         com.sas.util.transforms.TransformInterface converterClass)

  Registers a transformation (converterClass) from inputClass to outputClass.

  See Also:
    `unregisterTransform(java.lang.Class, java.lang.Class, com.sas.util.transforms.TransformInterface)`, `lookupTransform(java.lang.Class, java.lang.Class)`

### unregisterTransform

    public static void unregisterTransform(java.lang.Class inputClass,
                                           java.lang.Class outputClass,
                                           com.sas.util.transforms.TransformInterface converterClass)

  Unregisters a transformation (converterClass) from inputClass to outputClass.

  See Also:
    `registerTransform(java.lang.Class, java.lang.Class, com.sas.util.transforms.TransformInterface)`, `lookupTransform(java.lang.Class, java.lang.Class)`

### isTransformable

    public static boolean isTransformable(java.lang.Class inputClass,
                                          java.lang.Class outputClass)

  Check for a transformation from inputClass to outputClass from the pool of registered transformations.

  See Also:
    `lookupTransform(java.lang.Class, java.lang.Class)`, `registerTransform(java.lang.Class, java.lang.Class, com.sas.util.transforms.TransformInterface)`, `unregisterTransform(java.lang.Class, java.lang.Class, com.sas.util.transforms.TransformInterface)`

### lookupTransform

    public static com.sas.util.transforms.TransformInterface lookupTransform(java.lang.Class inputClass,
                                                                             java.lang.Class outputClass)

  Finds a transformation from inputClass to outputClass from the pool of registered transformations.

  See Also:
    `registerTransform(java.lang.Class, java.lang.Class, com.sas.util.transforms.TransformInterface)`, `unregisterTransform(java.lang.Class, java.lang.Class, com.sas.util.transforms.TransformInterface)`

### getRegisteredTransforms

    public static com.sas.util.transforms.TransformInterface[] getRegisteredTransforms()

  Returns an array of unique registered transform objects.

  Returns:
    an array of unique registered transform objects.

### getRegisteredSourceTransforms

    public static java.util.Hashtable getRegisteredSourceTransforms(java.lang.Class inputClass)

  Get the registered transforms that have the specified type as source objects.

### getRegisteredTargetTransforms

    public static java.util.Hashtable getRegisteredTargetTransforms(java.lang.Class targetClass)

  Get the registered transforms that have the specified type as target objects.

### getRegisteredSourceClasses

    public static java.util.Enumeration getRegisteredSourceClasses()

  Gets all the source classes the have a transform registered to that type.

### getRegisteredSourceClassesForTransform

    public static java.util.Enumeration getRegisteredSourceClassesForTransform(com.sas.util.transforms.TransformInterface transform)

  Gets all the source classes that the specifed transform is registered to.

### isTransformable

    public static boolean isTransformable(java.lang.Object source,
                                          java.lang.String sourceProperty,
                                          java.lang.Object target,
                                          java.lang.String targetProperty)

  Returns whether or not the specified source property can be transformed to the type of the specified target property.

  This is used by the IDE.

  See Also:
    `registerTransform(java.lang.Class, java.lang.Class, com.sas.util.transforms.TransformInterface)`, `unregisterTransform(java.lang.Class, java.lang.Class, com.sas.util.transforms.TransformInterface)`, `lookupTransform(java.lang.Class, java.lang.Class)`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.