public MethodSpec(String mthdName, String mthdInterface, String[] methodParamsArray) { checkMethodInterface(mthdInterface); methodName = emptyNullCheck(mthdName); methodInterface = emptyNullCheck(mthdInterface); if (methodParamsArray == null) { methodParams = null; } else if (methodParamsArray.length == 0) { methodParams = ""; } else { if (methodParamsArray[0] == null || methodParamsArray[0].length() == 0) throw new IllegalArgumentException("Invalid type name"); StringBuilder buffer = new StringBuilder(methodParamsArray[0]); for (int i = 1; i < methodParamsArray.length; i++) { if (methodParamsArray[i] == null || methodParamsArray[i].length() == 0) throw new IllegalArgumentException("Invalid type name"); buffer.append(","); buffer.append(methodParamsArray[i]); } methodParams = buffer.toString(); } initActions(); }
public MethodSpec(String mthdName, String mthdInterface, String[] methodParamsArray) { checkMethodInterface(mthdInterface); methodName = emptyNullCheck(mthdName); methodInterface = emptyNullCheck(mthdInterface); if (methodParamsArray == null) { methodParams = null; } else if (methodParamsArray.length == 0) { methodParams = ""; } else { if (methodParamsArray[0] == null || methodParamsArray[0].length() == 0) throw new IllegalArgumentException("Invalid type name"); StringBuilder buffer = new StringBuilder(methodParamsArray[0]); for (int i = 1; i < methodParamsArray.length; i++) { if (methodParamsArray[i] == null || methodParamsArray[i].length() == 0) throw new IllegalArgumentException("Invalid type name"); buffer.append(","); buffer.append(methodParamsArray[i]); } methodParams = buffer.toString(); } initActions(); }
public MethodSpec(String mthdName, String mthdInterface, String[] methodParamsArray) { checkMethodInterface(mthdInterface); methodName = emptyNullCheck(mthdName); methodInterface = emptyNullCheck(mthdInterface); if (methodParamsArray == null) { methodParams = null; } else if (methodParamsArray.length == 0) { methodParams = ""; } else { if (methodParamsArray[0] == null || methodParamsArray[0].length() == 0) throw new IllegalArgumentException("Invalid type name"); StringBuilder buffer = new StringBuilder(methodParamsArray[0]); for (int i = 1; i < methodParamsArray.length; i++) { if (methodParamsArray[i] == null || methodParamsArray[i].length() == 0) throw new IllegalArgumentException("Invalid type name"); buffer.append(","); buffer.append(methodParamsArray[i]); } methodParams = buffer.toString(); } initActions(); }
public MethodSpec(String mthdInterface, Method method) { checkMethodInterface(mthdInterface); methodName = method.getName(); methodInterface = emptyNullCheck(mthdInterface); Class[] paramTypes = method.getParameterTypes(); if (paramTypes.length == 0) { methodParams = ""; } else { StringBuilder buffer = new StringBuilder(paramTypes[0].getName()); for (int i = 1; i < paramTypes.length; i++) { buffer.append(","); getName(paramTypes[i], buffer); } methodParams = buffer.toString(); } initActions(); }
public MethodSpec(String mthdInterface, Method method) { checkMethodInterface(mthdInterface); methodName = method.getName(); methodInterface = emptyNullCheck(mthdInterface); Class[] paramTypes = method.getParameterTypes(); if (paramTypes.length == 0) { methodParams = ""; } else { StringBuilder buffer = new StringBuilder(paramTypes[0].getName()); for (int i = 1; i < paramTypes.length; i++) { buffer.append(","); getName(paramTypes[i], buffer); } methodParams = buffer.toString(); } initActions(); }
public MethodSpec(String mthdInterface, Method method) { checkMethodInterface(mthdInterface); methodName = method.getName(); methodInterface = emptyNullCheck(mthdInterface); Class[] paramTypes = method.getParameterTypes(); if (paramTypes.length == 0) { methodParams = ""; } else { StringBuilder buffer = new StringBuilder(paramTypes[0].getName()); for (int i = 1; i < paramTypes.length; i++) { buffer.append(","); getName(paramTypes[i], buffer); } methodParams = buffer.toString(); } initActions(); }