List<MessageFunction> getJavaFunctions() { if (javaFunctions == null) { return AsmMessageExtractor.DEFAULT_MESSAGE_FUNCTIONS; } else { int len = javaFunctions.length; MessageFunction[] functions = new MessageFunction[len]; for (int i=0; i<len; i++) { functions[i] = MessageFunction.fromJava(javaFunctions[i]); } return Arrays.asList(functions); } }
public static MessageFunction fromJava(String className, String signature) { MessageFunction fn = fromJava(signature); fn.setNamespace(className.replace('.', '/')); return fn; }
public static MessageFunction fromJava(String className, String signature) { MessageFunction fn = fromJava(signature); fn.setNamespace(className.replace('.', '/')); return fn; }
public static MessageFunction fromJava(String signature) { Matcher matcher = SIGNATURE_PATTERN.matcher(signature); if (matcher.matches()) { String returnType = matcher.group(1); String methodName = matcher.group(2); String parameters = matcher.group(3); String className; int idx = methodName.lastIndexOf('.'); if (idx >= 0) { className = methodName.substring(0, idx); methodName = methodName.substring(idx+1); } else { className = ""; } if (returnType == null) { returnType = "void"; } return fromJava(className, returnType, methodName, parameters); } else { throw new IllegalArgumentException("Invalid java method signature '" + signature + "'"); } }
public static MessageFunction fromJava(String signature) { Matcher matcher = SIGNATURE_PATTERN.matcher(signature); if (matcher.matches()) { String returnType = matcher.group(1); String methodName = matcher.group(2); String parameters = matcher.group(3); String className; int idx = methodName.lastIndexOf('.'); if (idx >= 0) { className = methodName.substring(0, idx); methodName = methodName.substring(idx+1); } else { className = ""; } if (returnType == null) { returnType = "void"; } return fromJava(className, returnType, methodName, parameters); } else { throw new IllegalArgumentException("Invalid java method signature '" + signature + "'"); } }