| java.lang.Object net.refractions.udig.core.AdapterUtil
AdapterUtil | public class AdapterUtil (Code) | | Methods to help manage adapters
author: jones since: 1.1.0 |
Method Summary | |
public boolean | canAdaptTo(String targetClass, Object obj) Determines if a class can be adapted based on its string representation. | public boolean | canAdaptTo(String targetClass, Object obj, ClassLoader classLoader) Determines if a class can be adapted based on its string representation. | public IAdaptable | getAdaptable(Object obj) | public IBlockingAdaptable | getBlockingAdapter(Object obj) | public T | getOperationTarget(String targetClass, Object obj, IProgressMonitor monitor) Since the target object may not be the object that the operation actually operates on, the
getOperationTarget() finds the real object and returns it or null if for some reason the
operation can be performed on the target.
Example:
A FeatureType readonly operation is called on a IResolve. | public T | getOperationTarget(Class<T> target, Object obj, IProgressMonitor monitor) Since the target object may not be the object that the operation actually operates on, the
getOperationTarget() finds the real object and returns it or null if for some reason the
operation can be performed on the target.
Example:
A FeatureType readonly operation is called on a IResolve. |
canAdaptTo | public boolean canAdaptTo(String targetClass, Object obj)(Code) | | Determines if a class can be adapted based on its string representation.
Parameters: targetClass - class name to check if adaptation can go to Parameters: obj - source object to adapt from |
canAdaptTo | public boolean canAdaptTo(String targetClass, Object obj, ClassLoader classLoader)(Code) | | Determines if a class can be adapted based on its string representation.
Parameters: targetClass - class name to check if adaptation can go to Parameters: obj - source object to adapt from Parameters: classLoader - object to instantiate the class with |
getAdaptable | public IAdaptable getAdaptable(Object obj)(Code) | | |
getOperationTarget | public T getOperationTarget(String targetClass, Object obj, IProgressMonitor monitor) throws IOException(Code) | | Since the target object may not be the object that the operation actually operates on, the
getOperationTarget() finds the real object and returns it or null if for some reason the
operation can be performed on the target.
Example:
A FeatureType readonly operation is called on a IResolve. The getOperationTarget would
resolve(FeatureSource.class) and return the Feature Source for the operation.
Parameters: target - the object the action is called on. Parameters: definition - the Configuration element definition of the operation. Parameters: monitor - The progress monitor for the operation job. throws: IOException - |
getOperationTarget | public T getOperationTarget(Class<T> target, Object obj, IProgressMonitor monitor) throws IOException(Code) | | Since the target object may not be the object that the operation actually operates on, the
getOperationTarget() finds the real object and returns it or null if for some reason the
operation can be performed on the target.
Example:
A FeatureType readonly operation is called on a IResolve. The getOperationTarget would
resolve(FeatureSource.class) and return the Feature Source for the operation.
Parameters: target - the object the action is called on. Parameters: definition - the Configuration element definition of the operation. Parameters: monitor - The progress monitor for the operation job. throws: IOException - |
|
|