/** * Return the parameter index for the given local index, or -1 if * the given local does not reference a param. * * @see #getLocalsIndex */ public int getParamsIndex(int localIndex) { int pos = 0; if (!getMethod().isStatic()) pos = 1; String[] params = getMethod().getParamNames(); for (int i = 0; i < params.length; i++, pos++) { if (localIndex == pos) return i; if (params[i].equals(long.class.getName()) || params[i].equals(double.class.getName())) pos++; } return -1; }
/** * Return the local variable index for the paramIndex'th parameter to * the method. Local variable indexes differ from parameter indexes because: * a) non-static methods use the 0th local variable for the 'this' ptr, and * b) double and long values occupy two spots in the local variable array. * Returns -1 if the given index is not valid. */ public int getLocalsIndex(int paramIndex) { if (paramIndex < 0) return -1; int pos = 0; if (!getMethod().isStatic()) pos = 1; String[] params = getMethod().getParamNames(); for (int i = 0; i < paramIndex; i++, pos++) { if (i == params.length) return -1; if (params[i].equals(long.class.getName()) || params[i].equals(double.class.getName())) pos++; } return pos; }
/** * Return the parameter index for the given local index, or -1 if * the given local does not reference a param. * * @see #getLocalsIndex */ public int getParamsIndex(int localIndex) { int pos = 0; if (!getMethod().isStatic()) pos = 1; String[] params = getMethod().getParamNames(); for (int i = 0; i < params.length; i++, pos++) { if (localIndex == pos) return i; if (params[i].equals(long.class.getName()) || params[i].equals(double.class.getName())) pos++; } return -1; }
/** * Return the local variable index for the paramIndex'th parameter to * the method. Local variable indexes differ from parameter indexes because: * a) non-static methods use the 0th local variable for the 'this' ptr, and * b) double and long values occupy two spots in the local variable array. * Returns -1 if the given index is not valid. */ public int getLocalsIndex(int paramIndex) { if (paramIndex < 0) return -1; int pos = 0; if (!getMethod().isStatic()) pos = 1; String[] params = getMethod().getParamNames(); for (int i = 0; i < paramIndex; i++, pos++) { if (i == params.length) return -1; if (params[i].equals(long.class.getName()) || params[i].equals(double.class.getName())) pos++; } return pos; }
if ((params.length == 0) && !getMethod().isStatic()) max = 1; else if (params.length > 0) {
if ((params.length == 0) && !getMethod().isStatic()) max = 1; else if (params.length > 0) {
if (meth.isStatic()) return null;
if (meth.isStatic()) return null;
if (meth.isStatic()) return null;
if (meth.isStatic()) return null;
if (meth.isStatic()) return null;