Package kawa.lang
Class AutoloadProcedure
- java.lang.Object
-
- gnu.mapping.PropertySet
-
- gnu.mapping.Procedure
-
- kawa.lang.AutoloadProcedure
-
- All Implemented Interfaces:
Named
,Externalizable
,Serializable
public class AutoloadProcedure extends Procedure implements Externalizable
Implement autoloading of Procedures. A named class is loaded, and apply requests are forwarded to it.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class gnu.mapping.Procedure
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
-
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
-
Constructor Summary
Constructors Constructor Description AutoloadProcedure()
AutoloadProcedure(String name, String className)
AutoloadProcedure(String name, String className, Language language)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
apply0()
Object
apply1(Object arg1)
Object
apply2(Object arg1, Object arg2)
Object
apply3(Object arg1, Object arg2, Object arg3)
Object
apply4(Object arg1, Object arg2, Object arg3, Object arg4)
Object
applyN(Object[] args)
Procedure
getLoaded()
Object
getProperty(Object key, Object defaultValue)
Procedure
getSetter()
int
numArgs()
ReturnminArgs()|(maxArgs<<12)
.void
print(PrintWriter ps)
void
readExternal(ObjectInput in)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class gnu.mapping.Procedure
applyL, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getReturnType, getSourceLocation, isSideEffectFree, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString
-
Methods inherited from class gnu.mapping.PropertySet
getName, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
-
-
-
Method Detail
-
print
public void print(PrintWriter ps)
-
getLoaded
public Procedure getLoaded()
-
numArgs
public int numArgs()
Description copied from class:Procedure
ReturnminArgs()|(maxArgs<<12)
. We use a single virtual function to reduce the number of methods in the system, as well as the number of virtual method table entries. We shift by 12 so the number can normally be represented using a sipush instruction, without requiring a constant pool entry.
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
getProperty
public Object getProperty(Object key, Object defaultValue)
- Overrides:
getProperty
in classPropertySet
-
-