Groovy Documentation

## org.codehaus.groovy.runtime
[Java] Class MethodRankHelper

    java.lang.Object
      org.codehaus.groovy.runtime.MethodRankHelper

    public class MethodRankHelper
    extends java.lang.Object

Utility class for MissingMethodException, MissingPropertyException etc. This class contains methods assisting in ranking and listing probable intended methods/fields when a exception is thrown.

Authors:
  Hjalmar Ekengren

Field Summary
`static int` | `DL_CASE`
`static int` | `DL_DELETE`
`static int` | `DL_SUBSTITUTION`
`static int` | `DL_TRANSPOSITION`
`static int` | `MAX_CONSTRUCTOR_SCORE`
`static int` | `MAX_FIELD_SCORE`
`static int` | `MAX_METHOD_SCORE`
`static int` | `MAX_RECOMENDATIONS`

Method Summary
`protected static java.lang.Class` | `boxVar(java.lang.Class c)`
`static int` | `damerauLevenshteinDistance(java.lang.Object[] s, java.lang.Object[] t)`
`static int` | `delDistance(java.lang.CharSequence s, java.lang.CharSequence t)`
`static java.lang.String` | `getConstructorSuggestionString(java.lang.Class type, java.lang.Object[] arguments)` Returns a string detailing possible solutions to a missing constructor if no good solutions can be found a empty string is returned.
`static java.lang.String` | `getMethodSuggestionString(java.lang.String methodName, java.lang.Class type, java.lang.Object[] arguments)` Returns a string detailing possible solutions to a missing method if no good solutions can be found a empty string is returned.
`static java.lang.String` | `getPropertySuggestionString(java.lang.String fieldName, java.lang.Class type)` Returns a string detailing possible solutions to a missing field or property if no good solutions can be found a empty string is returned.

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Field Detail

### DL_CASE

    public static final int DL_CASE

### DL_DELETE

    public static final int DL_DELETE

### DL_SUBSTITUTION

    public static final int DL_SUBSTITUTION

### DL_TRANSPOSITION

    public static final int DL_TRANSPOSITION

### MAX_CONSTRUCTOR_SCORE

    public static final int MAX_CONSTRUCTOR_SCORE

### MAX_FIELD_SCORE

    public static final int MAX_FIELD_SCORE

### MAX_METHOD_SCORE

    public static final int MAX_METHOD_SCORE

### MAX_RECOMENDATIONS

    public static final int MAX_RECOMENDATIONS

Method Detail

### boxVar

    protected static java.lang.Class boxVar(java.lang.Class c)

### damerauLevenshteinDistance

    public static int damerauLevenshteinDistance(java.lang.Object[] s, java.lang.Object[] t)

### delDistance

    public static int delDistance(java.lang.CharSequence s, java.lang.CharSequence t)

### getConstructorSuggestionString

    public static java.lang.String getConstructorSuggestionString(java.lang.Class type, java.lang.Object[] arguments)

  Returns a string detailing possible solutions to a missing constructor if no good solutions can be found a empty string is returned.
  Parameters:
    `arguments` - the arguments passed to the constructor
    `type` - the class on which the constructor is invoked
  Returns:
    a string with probable solutions to the exception

### getMethodSuggestionString

    public static java.lang.String getMethodSuggestionString(java.lang.String methodName, java.lang.Class type, java.lang.Object[] arguments)

  Returns a string detailing possible solutions to a missing method if no good solutions can be found a empty string is returned.
  Parameters:
    `methodName` - the name of the method that doesn't exist
    `type` - the class on which the method is invoked
    `arguments` - the arguments passed to the method
  Returns:
    a string with probable solutions to the exception

### getPropertySuggestionString

    public static java.lang.String getPropertySuggestionString(java.lang.String fieldName, java.lang.Class type)

  Returns a string detailing possible solutions to a missing field or property if no good solutions can be found a empty string is returned.
  Parameters:
    `fieldName` - the missing field
    `type` - the class on which the field is sought
  Returns:
    a string with probable solutions to the exception

Groovy Documentation