Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.services
Class TransformMethodSignature

    java.lang.Object
      org.apache.tapestry5.services.TransformMethodSignature

All Implemented Interfaces:
  java.lang.Comparable<TransformMethodSignature>

    public class TransformMethodSignature

extends java.lang.Object
implements java.lang.Comparable<TransformMethodSignature>

A representation of a method signature, which consists of its name, modifiers (primarily, visibility), return type, parameter types, and declared exception types.

Types are stored as class names (or primitive names) because the signature is used with `ClassTransformation` (which operates on as-yet unloaded classes).

Constructor Summary
`TransformMethodSignature(int modifiers, java.lang.String type, java.lang.String name, java.lang.String[] parameterTypes, java.lang.String[] exceptionTypes)`
`TransformMethodSignature(int modifiers, java.lang.String type, java.lang.String signature, java.lang.String name, java.lang.String[] parameterTypes, java.lang.String[] exceptionTypes)`
`TransformMethodSignature(java.lang.String name)` Convenience for adding a public void method with no parameters or exception types.

Method Summary
`int` | `compareTo(TransformMethodSignature o)` Sorting is primarily via method name.
`boolean` | `equals(java.lang.Object other)`
`java.lang.String[]` | `getExceptionTypes()` Returns a non-null array of the names of each declared exception type thrown by the method.
`java.lang.String` | `getMediumDescription()` Returns a shortened form of the string representation of the method.
`java.lang.String` | `getMethodName()` Returns the name of the method.
`int` | `getModifiers()` Returns the set of modifier flags for this method.
`java.lang.String[]` | `getParameterTypes()` Returns an array of the type name for each parameter.
`java.lang.String` | `getReturnType()` Return the type name of the return type of the method.
`java.lang.String` | `getSignature()`
`int` | `hashCode()`
`java.lang.String` | `toString()` Returns the long form description of the signature.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TransformMethodSignature

    public TransformMethodSignature(java.lang.String name)

  Convenience for adding a public void method with no parameters or exception types.

### TransformMethodSignature

    public TransformMethodSignature(int modifiers,
                                    java.lang.String type,
                                    java.lang.String name,
                                    java.lang.String[] parameterTypes,
                                    java.lang.String[] exceptionTypes)

### TransformMethodSignature

    public TransformMethodSignature(int modifiers,
                                    java.lang.String type,
                                    java.lang.String signature,
                                    java.lang.String name,
                                    java.lang.String[] parameterTypes,
                                    java.lang.String[] exceptionTypes)

Since:
  5.3

Method Detail

### getExceptionTypes

    public java.lang.String[] getExceptionTypes()

  Returns a non-null array of the names of each declared exception type thrown by the method. Calling code should not modify the array.

### getMethodName

    public java.lang.String getMethodName()

  Returns the name of the method.

### getModifiers

    public int getModifiers()

  Returns the set of modifier flags for this method.

  See Also:
    `Modifier`

### getSignature

    public java.lang.String getSignature()

### getParameterTypes

    public java.lang.String[] getParameterTypes()

  Returns an array of the type name for each parameter. Calling code should not modify the array.

### getReturnType

    public java.lang.String getReturnType()

  Return the type name of the return type of the method.

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object other)

  Overrides:
    `equals` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Returns the long form description of the signature. This includes modifiers, return type, method name, parameters and thrown exceptions, formatted approximately as it would appear in Java source (except that parameter names, which are not known, do no appear).

  Overrides:
    `toString` in class `java.lang.Object`

### compareTo

    public int compareTo(TransformMethodSignature o)

  Sorting is primarily via method name. For methods with the same name, the second level of sorting is by parameter count (descending).

  Specified by:
    `compareTo` in interface `java.lang.Comparable<TransformMethodSignature>`

### getMediumDescription

    public java.lang.String getMediumDescription()

  Returns a shortened form of the string representation of the method. It lists just the name of the method and the types of any parameters, omitting return type, exceptions and modifiers.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.