SmartFrog 3.10.000

org.smartfrog.sfcore.languages.sf.sfreference
Class SFApplyReference

java.lang.Object
  extended by org.smartfrog.sfcore.reference.Reference
      extended by org.smartfrog.sfcore.languages.sf.sfreference.SFReference
          extended by org.smartfrog.sfcore.languages.sf.sfreference.SFApplyReference
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Copying, ReferencePhases

public class SFApplyReference
extends SFReference
implements ReferencePhases

Representation of ApplyReference for the SF Language

See Also:
Serialized Form

Field Summary
protected  SFComponentDescription comp
           
 
Fields inherited from class org.smartfrog.sfcore.reference.Reference
data, eager, inc, initCap, ref
 
Constructor Summary
SFApplyReference(SFComponentDescription 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..
 Reference sfAsReference()
          Get tje run-time version of the reference
 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

comp

protected SFComponentDescription comp
Constructor Detail

SFApplyReference

public SFApplyReference(SFComponentDescription comp)
Method Detail

sfAsReference

public Reference sfAsReference()
                        throws SmartFrogCompilationException
Get tje run-time version of the reference

Specified by:
sfAsReference in interface ReferencePhases
Overrides:
sfAsReference in class SFReference
Returns:
the reference
Throws:
SmartFrogCompilationException

copy

public java.lang.Object copy()
Returns a copy of the reference, by cloning itself and the function part

Specified by:
copy in interface Copying
Overrides:
copy in class Reference
Returns:
copy of reference
See Also:
Copying

clone

public java.lang.Object clone()
Makes a clone of the reference. The inside ref holder is cloned, but the contained component is NOT.

Specified by:
clone in interface Copying
Overrides:
clone in class Reference
Returns:
clone of reference

equals

public boolean equals(java.lang.Object ref)
Checks if this and given reference are equal. Two references are considered to be equal if the component they wrap are ==

Overrides:
equals in class Reference
Parameters:
ref - to be compared
Returns:
true if equal, false if not

hashCode

public int hashCode()
Returns the hashcode for this reference. Hash code for reference is made out of the sum of the parts hashcodes

Overrides:
hashCode in class Reference
Returns:
integer hashcode

resolve

public java.lang.Object resolve(ReferenceResolver rr,
                                int index)
                         throws SmartFrogResolutionException
Resolves this apply reference by applying the function - unless this is data..

Overrides:
resolve in class Reference
Parameters:
rr - ReferenceResolver to be used for resolving this reference
index - index of first referencepart to start resolving at
Returns:
value found on resolving this function
Throws:
SmartFrogResolutionException - if reference failed to resolve

resolve

public java.lang.Object resolve(RemoteReferenceResolver rr,
                                int index)
                         throws SmartFrogResolutionException
Resolves this apply reference by applying the function - unless this is data..

Overrides:
resolve in class Reference
Parameters:
rr - ReferenceResolver to be used for resolving this reference
index - index of first referencepart to start resolving at
Returns:
value found on resolving this function
Throws:
SmartFrogResolutionException - if reference failed to resolve

toString

public java.lang.String toString()
Returns string representation of the reference. Overrides Object.toString.

Overrides:
toString in class Reference
Returns:
String representing the reference

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP