public final class

MethodType

extends Type
java.lang.Object
   ↳ sun.tools.java.Type
     ↳ sun.tools.java.MethodType

Class Overview

This class represents an Java method type. It overrides the relevant methods in class Type. WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.

Summary

[Expand]
Inherited Constants
From interface sun.tools.java.Constants
From interface sun.tools.java.RuntimeConstants
[Expand]
Inherited Fields
From class sun.tools.java.Type
From interface sun.tools.java.Constants
From interface sun.tools.java.RuntimeConstants
Public Methods
boolean equalArguments(Type t)
Check if the type arguments are the same.
Type[] getArgumentTypes()
Return the argument types.
Type getReturnType()
Return the return type.
int stackSize()
Return the amount of space this type takes up on the Java operand stack.
String typeString(String id, boolean abbrev, boolean ret)
Convert a Type to a string, if abbrev is true class names are not fully qualified, if ret is true the return type is included.
[Expand]
Inherited Methods
From class sun.tools.java.Type
From class java.lang.Object

Public Methods

public boolean equalArguments (Type t)

Check if the type arguments are the same.

Returns
  • true if both types are method types and the argument types are identical.

public Type[] getArgumentTypes ()

Return the argument types. Only works for method types.

public Type getReturnType ()

Return the return type. Only works for method types.

public int stackSize ()

Return the amount of space this type takes up on the Java operand stack. For a method this is equal to the total space taken up by the arguments.

public String typeString (String id, boolean abbrev, boolean ret)

Convert a Type to a string, if abbrev is true class names are not fully qualified, if ret is true the return type is included.