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
| Fields inherited from class com.svincent.smalljava.SmallType |
Boolean,
Byte,
Char,
debug,
Double,
EmptyArray,
Float,
Int,
Long,
Short,
Void |
| 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 java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SmallType.MethodType
public SmallType.MethodType(SmallType _returnType,
SmallType[] _argTypes)
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.