Package javassist.bytecode

# Class SignatureAttribute.MethodSignature

java.lang.Object
javassist.bytecode.SignatureAttribute.MethodSignature

Enclosing class:
  `SignatureAttribute`

public static class SignatureAttribute.MethodSignature extends Object
Method type signature.

## Constructor Summary

Constructors
Constructor
Description
`MethodSignature(SignatureAttribute.TypeParameter[] tp, SignatureAttribute.Type[] params, SignatureAttribute.Type ret, SignatureAttribute.ObjectType[] ex)`
Constructs a method type signature.

## Method Summary

Modifier and Type
Method
Description
`String`
`encode()`
Returns the encoded string representing the method type signature.
`SignatureAttribute.ObjectType[]`
`getExceptionTypes()`
Returns the types of the exceptions that may be thrown.
`SignatureAttribute.Type[]`
`getParameterTypes()`
Returns the types of the formal parameters.
`SignatureAttribute.Type`
`getReturnType()`
Returns the type of the returned value.
`SignatureAttribute.TypeParameter[]`
`getTypeParameters()`
Returns the formal type parameters.
`String`
`toString()`
Returns the string representation.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### MethodSignature

public MethodSignature(SignatureAttribute.TypeParameter[] tp, SignatureAttribute.Type[] params, SignatureAttribute.Type ret, SignatureAttribute.ObjectType[] ex)
Constructs a method type signature. Any parameter can be null to represent `void` or nothing.

Parameters:
  `tp` - type parameters.
  `params` - parameter types.
  `ret` - a return type, or null if the return type is `void`.
  `ex` - exception types.

## Method Details

### getTypeParameters

public SignatureAttribute.TypeParameter[] getTypeParameters()
Returns the formal type parameters.

Returns:
  a zero-length array if the type parameters are not specified.

### getParameterTypes

public SignatureAttribute.Type[] getParameterTypes()
Returns the types of the formal parameters.

Returns:
  a zero-length array if no formal parameter is taken.

### getReturnType

public SignatureAttribute.Type getReturnType()
Returns the type of the returned value.

### getExceptionTypes

public SignatureAttribute.ObjectType[] getExceptionTypes()
Returns the types of the exceptions that may be thrown.

Returns:
  a zero-length array if exceptions are never thrown or the exception types are not parameterized types or type variables.

### toString

public String toString()
Returns the string representation.

Overrides:
  `toString` in class `Object`

### encode

public String encode()
Returns the encoded string representing the method type signature.