com.svincent.smalljava
Class SmallType.MethodType

java.lang.Object
  |
  +--com.svincent.util.BaseObject
        |
        +--com.svincent.smalljava.SmallType
              |
              +--com.svincent.smalljava.SmallType.MethodType
Enclosing class:
SmallType

public static class SmallType.MethodType
extends SmallType

Represents a type for a method. Note that since in Java methods are not first-class, a method's type cannot be printed as Java code. writeAsJava is implemented, however, to print in the form: (parmType1, parmType2, ... parmTypeN)->returnType


Inner classes inherited from class com.svincent.smalljava.SmallType
SmallType.ArrayType, SmallType.MethodType, SmallType.ObjectType, SmallType.PrimitiveType
 
Fields inherited from class com.svincent.smalljava.SmallType
Boolean, Byte, Char, debug, Double, EmptyArray, Float, Int, Long, Short, Void
 
Constructor Summary
SmallType.MethodType(SmallType _returnType, SmallType[] _argTypes)
           
 
Method Summary
 java.lang.String argsTypeDescriptor()
           
 int getArgCount()
           
 SmallType getArgType(int i)
           
 SmallType[] getArgTypes()
           
 SmallType getReturnType()
           
 java.lang.String returnTypeDescriptor()
           
 void writeAsJava(java.io.PrintWriter out)
          Note: not really Java code, as method descriptors have no real correspondence in Java.
 void writeDescriptor(java.io.PrintWriter out)
          Write this type's type descriptor to the given PrintWriter.
 
Methods inherited from class com.svincent.smalljava.SmallType
addAdd, addArrayNew, addArrayStore, addCmp, addLoad, addReturn, addStore, addSub, array, descriptorToString, isPrimitive, main, parseFieldDescriptor, parseMethodDescriptor, tag, testField, testMethod
 
Methods inherited from class com.svincent.util.BaseObject
dump, dump, dumpToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmallType.MethodType

public SmallType.MethodType(SmallType _returnType,
                            SmallType[] _argTypes)
Method Detail

getReturnType

public SmallType getReturnType()

getArgTypes

public SmallType[] getArgTypes()

getArgCount

public int getArgCount()

getArgType

public SmallType getArgType(int i)

writeAsJava

public void writeAsJava(java.io.PrintWriter out)
Note: not really Java code, as method descriptors have no real correspondence in Java.
Overrides:
writeAsJava in class SmallType

writeDescriptor

public void writeDescriptor(java.io.PrintWriter out)
Description copied from class: SmallType
Write this type's type descriptor to the given PrintWriter.
Overrides:
writeDescriptor in class SmallType

argsTypeDescriptor

public java.lang.String argsTypeDescriptor()

returnTypeDescriptor

public java.lang.String returnTypeDescriptor()



This is documentation for Moksa Prolog, which can be found at http://www.svincent.com/moksa/

Copyright © 1999 Shawn P. Vincent.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.