Class DynamicObject
- java.lang.Object
-
- org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.util.DynamicObject
-
public class DynamicObject extends Object
Utility class to access (R/W) field in super class hierarchy.It has decent performance as it LRU-caches reflective call.
-
-
Constructor Summary
Constructors Constructor Description DynamicObject(Object target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
get(String fieldName)
double
getDouble(String fieldName)
int
getInt(String fieldName)
protected void
handleException(Throwable cause)
Object
invoke(String methodName, Class<?>[] parameterTypes, Object... args)
void
set(String fieldName, Object value)
void
setDouble(String fieldName, double value)
void
setInt(String fieldName, int value)
-
-
-
Constructor Detail
-
DynamicObject
public DynamicObject(Object target)
-
-
Method Detail
-
getDouble
public double getDouble(String fieldName)
-
setDouble
public void setDouble(String fieldName, double value)
-
getInt
public int getInt(String fieldName)
-
setInt
public void setInt(String fieldName, int value)
-
handleException
protected void handleException(Throwable cause)
- Parameters:
cause
-
-
-