gnu.kawa.functions
Class GetNamedInstancePart

java.lang.Object
  extended by gnu.mapping.PropertySet
      extended by gnu.mapping.Procedure
          extended by gnu.mapping.ProcedureN
              extended by gnu.kawa.functions.GetNamedInstancePart
All Implemented Interfaces:
CanInline, HasSetter, Named, java.io.Externalizable, java.io.Serializable

public class GetNamedInstancePart
extends ProcedureN
implements java.io.Externalizable, CanInline, HasSetter

The value of the Kawa Scehem expression '*:PART-NAME'. This function invokes a method or accesses a field, if the PART-NAME starts with a '.'. This syntax is semi-depecated, since instead of (*:method-name instance args ...) you can now write (instance:method-name args ...), and instead of (*:.field-name instance) you can write instance:field-name (without the parentheses).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gnu.mapping.ProcedureN
noArgs
 
Constructor Summary
GetNamedInstancePart()
           
GetNamedInstancePart(java.lang.String name)
           
 
Method Summary
 java.lang.Object applyN(java.lang.Object[] args)
           
 Procedure getSetter()
           
 Expression inline(ApplyExp exp, ExpWalker walker)
          Inline an application of this Procedure and return result.
static Expression makeExp(Expression member)
           
 int numArgs()
          Return minArgs()|(maxArgs<<12).
 void readExternal(java.io.ObjectInput in)
           
 void setPartName(java.lang.String name)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class gnu.mapping.ProcedureN
apply0, apply1, apply2, apply3, apply4
 
Methods inherited from class gnu.mapping.Procedure
apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getSourceLocation, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString
 
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GetNamedInstancePart

public GetNamedInstancePart()

GetNamedInstancePart

public GetNamedInstancePart(java.lang.String name)
Method Detail

makeExp

public static Expression makeExp(Expression member)

setPartName

public void setPartName(java.lang.String name)

numArgs

public int numArgs()
Description copied from class: Procedure
Return minArgs()|(maxArgs<<12).

Overrides:
numArgs in class Procedure

inline

public Expression inline(ApplyExp exp,
                         ExpWalker walker)
Description copied from interface: CanInline
Inline an application of this Procedure and return result. Can return original expression.

Specified by:
inline in interface CanInline

applyN

public java.lang.Object applyN(java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
applyN in class ProcedureN
Throws:
java.lang.Throwable

getSetter

public Procedure getSetter()
Specified by:
getSetter in interface HasSetter
Overrides:
getSetter in class Procedure

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException