org.omegahat.Environment.Interpreter
Interface DynamicFieldAccessInt
- All Known Implementing Classes:
- ObjectDatabase, AbstractUserClass, NamingService, FieldAccessibleInterfaceRepository
- public interface DynamicFieldAccessInt
This is a very special interface the mereley flags the interpreter to
pass field access expressions directly to a specific routine in the
implementing class. This is of particular relevance in
UserClass
objects have "fields" but which are not
actually Java fields. They are interpreted fields. And so we have
to treat them specially. Rather than simply looking to see if the
class extends AbstractUserClass
, we make this more
general so that other classes can play by providing an explicit
interface.
This interface provides a mechanism by which objects can reflect a
named "field" in whatever way they chose, but the user can access
fields in a consistent manner. The particular motivation is to allow
expressions of the form
a.b.c
refer to pseudo-fields b and c in their respective parents (a and b)
without requiring that they be real Java files. This mechanism is
used in the evaluation of
FieldAccess to evaluate
expression such as those above.
|
Method Summary |
java.lang.Object |
getDynamicField(java.lang.String name)
|
java.lang.Object |
setDynamicField(java.lang.String name,
java.lang.Object value)
|
getDynamicField
public java.lang.Object getDynamicField(java.lang.String name)
throws java.lang.Throwable
setDynamicField
public java.lang.Object setDynamicField(java.lang.String name,
java.lang.Object value)
throws java.lang.Throwable