public String toString() { return String.format( "%s%s[%d]", interp == InterpolationType.NONE ? "" : interp.name().toLowerCase() + " ", type.name().toLowerCase(), size()); }
private boolean isValidParameter( String name, ParameterType type, InterpolationType interp, int requestedSize, Parameter p) { if (p == null) return false; if (p.type != type) { UI.printWarning( Module.API, "Parameter %s requested as a %s - declared as %s", name, type.name().toLowerCase(), p.type.name().toLowerCase()); return false; } if (p.interp != interp) { UI.printWarning( Module.API, "Parameter %s requested as a %s - declared as %s", name, interp.name().toLowerCase(), p.interp.name().toLowerCase()); return false; } if (requestedSize > 0 && p.size() != requestedSize) { UI.printWarning( Module.API, "Parameter %s requires %d %s - declared with %d", name, requestedSize, requestedSize == 1 ? "value" : "values", p.size()); return false; } p.checked = true; return true; }
public String getTypeName() { return type.name(); }