org.incava.java

Class ParameterUtil


public class ParameterUtil
extends SimpleNodeUtil

Miscellaneous routines for parameters.

Method Summary

protected static int
getExactMatch(List parameters, Object[] values)
protected static int
getListMatch(List aList, int aIndex, List bList)
Returns 0 for exact match, +1 for misordered match, -1 for no match.
static int[]
getMatch(List aParameters, int aIndex, List bParameters)
static double
getMatchScore(net.sourceforge.pmd.ast.ASTFormalParameters a, net.sourceforge.pmd.ast.ASTFormalParameters b)
static net.sourceforge.pmd.ast.ASTFormalParameter
getParameter(net.sourceforge.pmd.ast.ASTFormalParameters params, int index)
static List
getParameterList(net.sourceforge.pmd.ast.ASTFormalParameters params)
static net.sourceforge.pmd.ast.Token
getParameterName(net.sourceforge.pmd.ast.ASTFormalParameter param)
static net.sourceforge.pmd.ast.Token
getParameterName(net.sourceforge.pmd.ast.ASTFormalParameters params, int index)
static net.sourceforge.pmd.ast.Token[]
getParameterNames(net.sourceforge.pmd.ast.ASTFormalParameters params)
static String
getParameterType(net.sourceforge.pmd.ast.ASTFormalParameter param)
static String
getParameterType(net.sourceforge.pmd.ast.ASTFormalParameters params, int index)
static List
getParameterTypes(net.sourceforge.pmd.ast.ASTFormalParameters params)
static net.sourceforge.pmd.ast.ASTFormalParameter[]
getParameters(net.sourceforge.pmd.ast.ASTFormalParameters params)

Methods inherited from class org.incava.java.SimpleNodeUtil

dump, dump, findChild, findChild, findChildren, findChildren, findToken, getChildren, getChildren, getChildrenSerially, getChildrenSerially, getLeadingToken, getLeadingTokens, getLevel, getLocation, getParent, getTokens, hasChildren, hasLeadingToken, print, print, toString

Method Details

getExactMatch

protected static int getExactMatch(List parameters,
                                   Object[] values)

getListMatch

protected static int getListMatch(List aList,
                                  int aIndex,
                                  List bList)
Returns 0 for exact match, +1 for misordered match, -1 for no match.

getMatch

public static int[] getMatch(List aParameters,
                             int aIndex,
                             List bParameters)

getMatchScore

public static double getMatchScore(net.sourceforge.pmd.ast.ASTFormalParameters a,
                                   net.sourceforge.pmd.ast.ASTFormalParameters b)

getParameter

public static net.sourceforge.pmd.ast.ASTFormalParameter getParameter(net.sourceforge.pmd.ast.ASTFormalParameters params,
                                                                      int index)

getParameterList

public static List getParameterList(net.sourceforge.pmd.ast.ASTFormalParameters params)

getParameterName

public static net.sourceforge.pmd.ast.Token getParameterName(net.sourceforge.pmd.ast.ASTFormalParameter param)

getParameterName

public static net.sourceforge.pmd.ast.Token getParameterName(net.sourceforge.pmd.ast.ASTFormalParameters params,
                                                             int index)

getParameterNames

public static net.sourceforge.pmd.ast.Token[] getParameterNames(net.sourceforge.pmd.ast.ASTFormalParameters params)

getParameterType

public static String getParameterType(net.sourceforge.pmd.ast.ASTFormalParameter param)

getParameterType

public static String getParameterType(net.sourceforge.pmd.ast.ASTFormalParameters params,
                                      int index)

getParameterTypes

public static List getParameterTypes(net.sourceforge.pmd.ast.ASTFormalParameters params)

getParameters

public static net.sourceforge.pmd.ast.ASTFormalParameter[] getParameters(net.sourceforge.pmd.ast.ASTFormalParameters params)