|
Last change
on this file was
6,
checked in by dsowen, 21 years ago
|
|
Split out the access stuff into accesslib.
New Creator interface off-loads object creation to user.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
|
File size:
994 bytes
|
| Line | |
|---|
| 1 | /* |
|---|
| 2 | * Created on Aug 2, 2005 |
|---|
| 3 | * |
|---|
| 4 | * $Log$ |
|---|
| 5 | * Revision 1.2 2005/09/21 22:00:45 dsowen |
|---|
| 6 | * Split out the access stuff into accesslib. |
|---|
| 7 | * New Creator interface off-loads object creation to user. |
|---|
| 8 | * |
|---|
| 9 | * Revision 1.1 2005/08/03 00:35:29 dsowen |
|---|
| 10 | * Initial commit. |
|---|
| 11 | * |
|---|
| 12 | */ |
|---|
| 13 | package ws.fugue88.jpath; |
|---|
| 14 | |
|---|
| 15 | import java.lang.reflect.InvocationTargetException; |
|---|
| 16 | |
|---|
| 17 | import ws.fugue88.access.Accessor; |
|---|
| 18 | |
|---|
| 19 | /** |
|---|
| 20 | * @author dsowen |
|---|
| 21 | */ |
|---|
| 22 | public class PropertyAccessor implements Accessor { |
|---|
| 23 | |
|---|
| 24 | public Class getType() |
|---|
| 25 | { |
|---|
| 26 | return _prop.getType(); |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | public void clearValue() throws InvocationTargetException |
|---|
| 30 | { |
|---|
| 31 | _prop.setValue(_that, null); |
|---|
| 32 | } |
|---|
| 33 | |
|---|
| 34 | public Object getValue() throws InvocationTargetException |
|---|
| 35 | { |
|---|
| 36 | return _prop.getValue(_that); |
|---|
| 37 | } |
|---|
| 38 | |
|---|
| 39 | public void setValue(final Object value) throws InvocationTargetException |
|---|
| 40 | { |
|---|
| 41 | _prop.setValue(_that, value); |
|---|
| 42 | } |
|---|
| 43 | |
|---|
| 44 | PropertyAccessor(final Object that, final Property property) |
|---|
| 45 | { |
|---|
| 46 | _that = that; |
|---|
| 47 | _prop = property; |
|---|
| 48 | } |
|---|
| 49 | |
|---|
| 50 | private final Object _that; |
|---|
| 51 | private final Property _prop; |
|---|
| 52 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.