Package gnu.mapping
Class Procedure0
- java.lang.Object
-
- gnu.mapping.PropertySet
-
- gnu.mapping.Procedure
-
- gnu.mapping.Procedure0
-
- All Implemented Interfaces:
Named
- Direct Known Subclasses:
ConstantFunction0,StaticGet
public abstract class Procedure0 extends Procedure
Abstract class for 0-argument procedures.
-
-
Field Summary
Fields Modifier and Type Field Description static MethodHandleapplyToObject-
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 Procedure0()Procedure0(String name)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Objectapply0()Objectapply1(Object arg1)Objectapply2(Object arg1, Object arg2)Objectapply3(Object arg1, Object arg2, Object arg3)Objectapply4(Object arg1, Object arg2, Object arg3, Object arg4)ObjectapplyN(Object[] args)static ObjectapplyToObject(Procedure proc, CallContext ctx)intnumArgs()ReturnminArgs()|(maxArgs<<12).-
Methods inherited from class gnu.mapping.Procedure
applyL, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getReturnType, getSetter, getSourceLocation, isSideEffectFree, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString
-
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
-
-
-
Field Detail
-
applyToObject
public static final MethodHandle applyToObject
-
-
Constructor Detail
-
Procedure0
public Procedure0()
-
Procedure0
public Procedure0(String name)
-
-
Method Detail
-
numArgs
public int numArgs()
Description copied from class:ProcedureReturnminArgs()|(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.
-
applyToObject
public static Object applyToObject(Procedure proc, CallContext ctx) throws Throwable
- Throws:
Throwable
-
-