Package kawa.lang

Class AutoloadProcedure

  • All Implemented Interfaces:
    Named, java.io.Externalizable, java.io.Serializable

    public class AutoloadProcedure
    extends Procedure
    implements java.io.Externalizable
    Implement autoloading of Procedures. A named class is loaded, and apply requests are forwarded to it.
    See Also:
    Serialized Form
    • Constructor Detail

      • AutoloadProcedure

        public AutoloadProcedure()
      • AutoloadProcedure

        public AutoloadProcedure​(java.lang.String name,
                                 java.lang.String className)
      • AutoloadProcedure

        public AutoloadProcedure​(java.lang.String name,
                                 java.lang.String className,
                                 Language language)
    • Method Detail

      • print

        public void print​(java.io.PrintWriter ps)
      • numArgs

        public int numArgs()
        Description copied from class: Procedure
        Return minArgs()|(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.
        Overrides:
        numArgs in class Procedure
      • apply0

        public java.lang.Object apply0()
                                throws java.lang.Throwable
        Overrides:
        apply0 in class Procedure
        Throws:
        java.lang.Throwable
      • apply1

        public java.lang.Object apply1​(java.lang.Object arg1)
                                throws java.lang.Throwable
        Overrides:
        apply1 in class Procedure
        Throws:
        java.lang.Throwable
      • apply2

        public java.lang.Object apply2​(java.lang.Object arg1,
                                       java.lang.Object arg2)
                                throws java.lang.Throwable
        Overrides:
        apply2 in class Procedure
        Throws:
        java.lang.Throwable
      • apply3

        public java.lang.Object apply3​(java.lang.Object arg1,
                                       java.lang.Object arg2,
                                       java.lang.Object arg3)
                                throws java.lang.Throwable
        Overrides:
        apply3 in class Procedure
        Throws:
        java.lang.Throwable
      • apply4

        public java.lang.Object apply4​(java.lang.Object arg1,
                                       java.lang.Object arg2,
                                       java.lang.Object arg3,
                                       java.lang.Object arg4)
                                throws java.lang.Throwable
        Overrides:
        apply4 in class Procedure
        Throws:
        java.lang.Throwable
      • applyN

        public java.lang.Object applyN​(java.lang.Object[] args)
                                throws java.lang.Throwable
        Overrides:
        applyN in class Procedure
        Throws:
        java.lang.Throwable
      • 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
      • getProperty

        public java.lang.Object getProperty​(java.lang.Object key,
                                            java.lang.Object defaultValue)
        Overrides:
        getProperty in class PropertySet