|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.refractions.udig.core.AdapterUtil
public class AdapterUtil
Methods to help manage adapters
Field Summary | |
---|---|
static AdapterUtil |
instance
|
Method Summary | ||
---|---|---|
boolean |
canAdaptTo(java.lang.String targetClass,
java.lang.Object obj)
Determines if a class can be adapted based on its string representation. |
|
boolean |
canAdaptTo(java.lang.String targetClass,
java.lang.Object obj,
java.lang.ClassLoader classLoader)
Determines if a class can be adapted based on its string representation. |
|
IAdaptable |
getAdaptable(java.lang.Object obj)
|
|
IBlockingAdaptable |
getBlockingAdapter(java.lang.Object obj)
|
|
|
getOperationTarget(java.lang.Class<T> target,
java.lang.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. |
|
|
getOperationTarget(java.lang.String targetClass,
java.lang.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final AdapterUtil instance
Method Detail |
---|
public boolean canAdaptTo(java.lang.String targetClass, java.lang.Object obj)
targetClass
- class name to check if adaptation can go toobj
- source object to adapt from
public boolean canAdaptTo(java.lang.String targetClass, java.lang.Object obj, java.lang.ClassLoader classLoader)
targetClass
- class name to check if adaptation can go toobj
- source object to adapt fromclassLoader
- object to instantiate the class with
public IAdaptable getAdaptable(java.lang.Object obj)
public IBlockingAdaptable getBlockingAdapter(java.lang.Object obj)
public <T> T getOperationTarget(java.lang.String targetClass, java.lang.Object obj, IProgressMonitor monitor) throws java.io.IOException
Example:
A FeatureType readonly operation is called on a IResolve. The getOperationTarget would resolve(FeatureSource.class) and return the Feature Source for the operation.
target
- the object the action is called on.definition
- the Configuration element definition of the operation.monitor
- The progress monitor for the operation job.
java.io.IOException
public <T> T getOperationTarget(java.lang.Class<T> target, java.lang.Object obj, IProgressMonitor monitor) throws java.io.IOException
Example:
A FeatureType readonly operation is called on a IResolve. The getOperationTarget would resolve(FeatureSource.class) and return the Feature Source for the operation.
target
- the object the action is called on.definition
- the Configuration element definition of the operation.monitor
- The progress monitor for the operation job.
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |