|
SmartFrog 3.10.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.smartfrog.sfcore.reference.Reference
org.smartfrog.sfcore.reference.ApplyReference
public class ApplyReference
The subclass of Reference that is a function application. The structure of the classes is historical, in that function applications were added much later. A different structure would have been prefereable - an abstract class indicating some object that resolves in a context, with specializations that are link references and apply references. However unfortunately for backward compatility reasons this is not possible. Consequently ApplyReference impements the entire gamut of the reference behaviour, inlcuding having parts, which is not relevant to a function applicaiton. It should override these methods and generate some form of run-time exception - this has not been implemented.
The function application reference resolves by evaluating hte refeences it contains, then evaluating the funciton. If
| Field Summary | |
|---|---|
protected ComponentDescription |
comp
|
| Fields inherited from class org.smartfrog.sfcore.reference.Reference |
|---|
data, eager, inc, initCap, ref |
| Constructor Summary | |
|---|---|
ApplyReference(ComponentDescription comp)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Makes a clone of the reference. |
java.lang.Object |
copy()
Returns a copy of the reference, by cloning itself and the function part |
boolean |
equals(java.lang.Object ref)
Checks if this and given reference are equal. |
int |
hashCode()
Returns the hashcode for this reference. |
java.lang.Object |
resolve(ReferenceResolver rr,
int index)
Resolves this apply reference by applying the function - unless this is data.. |
java.lang.Object |
resolve(RemoteReferenceResolver rr,
int index)
Resolves this apply reference by applying the function - unless this is data.. |
java.lang.String |
toString()
Returns string representation of the reference. |
| Methods inherited from class org.smartfrog.sfcore.reference.Reference |
|---|
addElement, addElements, clone, elementAt, elements, firstElement, fromString, getData, getEager, lastElement, removeElement, setData, setEager, setElementAt, size |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ComponentDescription comp
| Constructor Detail |
|---|
public ApplyReference(ComponentDescription comp)
| Method Detail |
|---|
public java.lang.Object copy()
copy in interface Copyingcopy in class ReferenceCopyingpublic java.lang.Object clone()
clone in interface Copyingclone in class Referencepublic boolean equals(java.lang.Object ref)
equals in class Referenceref - to be compared
public int hashCode()
hashCode in class Reference
public java.lang.Object resolve(ReferenceResolver rr,
int index)
throws SmartFrogResolutionException
resolve in class Referencerr - ReferenceResolver to be used for resolving this referenceindex - index of first referencepart to start resolving at
SmartFrogResolutionException - if reference failed to resolve
public java.lang.Object resolve(RemoteReferenceResolver rr,
int index)
throws SmartFrogResolutionException
resolve in class Referencerr - ReferenceResolver to be used for resolving this referenceindex - index of first referencepart to start resolving at
SmartFrogResolutionException - if reference failed to resolvepublic java.lang.String toString()
toString in class Reference
|
SmartFrog CORE 3.10.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||