|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--org.omegahat.Interfaces.NativeInterface.InterfaceReference
The base class for the two reference objects, anonymous and named, used to store objects created in Java and passed back to other applications such as and via the JNI, avoiding conversion and available for reuse in further expressions/calls.
This allows us to maintain references to Java objects from
within these systems that can be used in other calls.
Unnecessary conversion of arbitrary Java
objects to structures in these other languages can be avoided.
We would otherwise either have to specify methods to map each Java class
to a corresponding structure in S/R. Otherwise, we could
use a deep copy of the Java object's fields to an
S/R list.
NamedReference,
AnonymousReference| Field Summary | |
protected java.lang.String |
className
|
protected org.omegahat.Environment.Databases.Database |
database
The database in which the object identified by the key lives. |
protected java.lang.String |
key
The name of the entry in the database which this object identifies. |
protected OmegaInterfaceManager |
manager
The interface manager in which the object was created and resides. |
| Constructor Summary | |
InterfaceReference()
|
|
InterfaceReference(java.lang.String key,
OmegaInterfaceManager manager)
Create the reference for the given name using the specified manager and its default database. |
|
InterfaceReference(java.lang.String key,
OmegaInterfaceManager manager,
org.omegahat.Environment.Databases.Database db)
Create the reference for the object named by key in the specified database
(either the named or anonymous database)
associated with the given InterfaceManager |
|
InterfaceReference(java.lang.String key,
OmegaInterfaceManager manager,
org.omegahat.Environment.Databases.Database db,
java.lang.String className)
|
|
| Method Summary | |
org.omegahat.Environment.Databases.Database |
database()
The Database
in which the referenced object resides. |
org.omegahat.Environment.Databases.Database |
database(org.omegahat.Environment.Databases.Database db)
Store the Database
in which the referenced object lives. |
java.lang.Object |
eval(org.omegahat.Environment.Interpreter.Evaluator evaluator)
Evaluate the reference object, returning the value to which it refers. |
java.lang.Object |
eval(java.lang.Object[] args,
org.omegahat.Environment.Interpreter.Evaluator evaluator)
|
java.lang.String |
getClassName()
Accessor for className field |
java.lang.String |
key()
Retrieve the name of the object to which this object refers. |
java.lang.String |
key(java.lang.String v)
Set the name of the object being referenced by this object. |
OmegaInterfaceManager |
manager()
The interface manager |
OmegaInterfaceManager |
manager(OmegaInterfaceManager m)
|
java.lang.String |
setClassName(java.lang.String name)
Accessor for className field |
java.lang.String |
toString()
Show the key as a pointer to some other object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String key
protected org.omegahat.Environment.Databases.Database database
key lives.keyprotected OmegaInterfaceManager manager
protected java.lang.String className
| Constructor Detail |
public InterfaceReference()
public InterfaceReference(java.lang.String key,
OmegaInterfaceManager manager)
key - name of the object being referencedmanager - interface manager in which the
object resides, specifically in the default
database.
public InterfaceReference(java.lang.String key,
OmegaInterfaceManager manager,
org.omegahat.Environment.Databases.Database db)
key in the specified database
(either the named or anonymous database)
associated with the given InterfaceManagerkey - the name of the object referenced by this objectmanager - the interface manager in which the object
is created and connected with the databasedb - the database, either the named or
anonymous, associated with the
InterfaceManager.
public InterfaceReference(java.lang.String key,
OmegaInterfaceManager manager,
org.omegahat.Environment.Databases.Database db,
java.lang.String className)
| Method Detail |
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String key()
database()
to get the actual object.public java.lang.String key(java.lang.String v)
public OmegaInterfaceManager manager()
public OmegaInterfaceManager manager(OmegaInterfaceManager m)
public org.omegahat.Environment.Databases.Database database()
Database
in which the referenced object resides.public org.omegahat.Environment.Databases.Database database(org.omegahat.Environment.Databases.Database db)
Database
in which the referenced object lives.public java.lang.String getClassName()
className fieldpublic java.lang.String setClassName(java.lang.String name)
className field
public java.lang.Object eval(org.omegahat.Environment.Interpreter.Evaluator evaluator)
throws java.lang.Throwable
eval in interface org.omegahat.Environment.Language.Evaluable
public java.lang.Object eval(java.lang.Object[] args,
org.omegahat.Environment.Interpreter.Evaluator evaluator)
throws java.lang.Throwable
eval in interface org.omegahat.Environment.Language.Evaluable
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||