private boolean isVarArgCall() { StructClass cl = DecompilerContext.getStructContext().getClass(classname); if (cl != null) { StructMethod mt = cl.getMethod(InterpreterUtil.makeUniqueKey(name, stringDescriptor)); if (mt != null) { return mt.hasModifier(CodeConstants.ACC_VARARGS); } } else { // TODO: tap into IDEA indices to access libraries methods details // try to check the class on the classpath Method mtd = ClasspathHelper.findMethod(classname, name, descriptor); return mtd != null && mtd.isVarArgs(); } return false; }
StructMethod mt = cl.getMethod(InterpreterUtil.makeUniqueKey(name, stringDescriptor)); if (mt != null) { MethodDescriptor md = MethodDescriptor.parseDescriptor(mt.getDescriptor());
public ClassNode(String content_class_name, String content_method_name, String content_method_descriptor, int content_method_invocation_type, String lambda_class_name, String lambda_method_name, String lambda_method_descriptor, StructClass classStruct) { // lambda class constructor this.type = CLASS_LAMBDA; this.classStruct = classStruct; // 'parent' class containing the static function lambdaInformation = new LambdaInformation(); lambdaInformation.method_name = lambda_method_name; lambdaInformation.method_descriptor = lambda_method_descriptor; lambdaInformation.content_class_name = content_class_name; lambdaInformation.content_method_name = content_method_name; lambdaInformation.content_method_descriptor = content_method_descriptor; lambdaInformation.content_method_invocation_type = content_method_invocation_type; lambdaInformation.content_method_key = InterpreterUtil.makeUniqueKey(lambdaInformation.content_method_name, lambdaInformation.content_method_descriptor); anonymousClassType = new VarType(lambda_class_name, true); boolean is_method_reference = (content_class_name != classStruct.qualifiedName); if (!is_method_reference) { // content method in the same class, check synthetic flag StructMethod mt = classStruct.getMethod(content_method_name, content_method_descriptor); is_method_reference = !mt.isSynthetic(); // if not synthetic -> method reference } lambdaInformation.is_method_reference = is_method_reference; lambdaInformation.is_content_method_static = (lambdaInformation.content_method_invocation_type == CodeConstants.CONSTANT_MethodHandle_REF_invokeStatic); // FIXME: redundant? }
StructMethod mt = cl.getMethod(InterpreterUtil.makeUniqueKey(name, stringDescriptor)); if (mt != null) { MethodDescriptor md = MethodDescriptor.parseDescriptor(mt.getDescriptor());
attr.getMethodName() != null && node.classStruct.qualifiedName.equals(attr.getClassName()) && node.classStruct.getMethod(attr.getMethodName(), attr.getMethodDescriptor()) != null) { child.enclosingMethod = InterpreterUtil.makeUniqueKey(attr.getMethodName(), attr.getMethodDescriptor()); continue;
StructMethod mt = cl.getMethod(node.lambdaInformation.content_method_key); MethodWrapper methodWrapper = wrapper.getMethodWrapper(mt.getName(), mt.getDescriptor()); MethodDescriptor md_content = MethodDescriptor.parseDescriptor(node.lambdaInformation.content_method_descriptor);
private boolean isVarArgCall() { StructClass cl = DecompilerContext.getStructContext().getClass(classname); if (cl != null) { StructMethod mt = cl.getMethod(InterpreterUtil.makeUniqueKey(name, stringDescriptor)); if (mt != null) { return mt.hasModifier(CodeConstants.ACC_VARARGS); } } else { // TODO: tap into IDEA indices to access libraries methods details // try to check the class on the classpath Method mtd = ClasspathHelper.findMethod(classname, name, descriptor); return mtd != null && mtd.isVarArgs(); } return false; }
public ClassNode(String content_class_name, String content_method_name, String content_method_descriptor, int content_method_invocation_type, String lambda_class_name, String lambda_method_name, String lambda_method_descriptor, StructClass classStruct) { // lambda class constructor this.type = CLASS_LAMBDA; this.classStruct = classStruct; // 'parent' class containing the static function lambdaInformation = new LambdaInformation(); lambdaInformation.class_name = lambda_class_name; lambdaInformation.method_name = lambda_method_name; lambdaInformation.method_descriptor = lambda_method_descriptor; lambdaInformation.content_class_name = content_class_name; lambdaInformation.content_method_name = content_method_name; lambdaInformation.content_method_descriptor = content_method_descriptor; lambdaInformation.content_method_invocation_type = content_method_invocation_type; lambdaInformation.content_method_key = InterpreterUtil.makeUniqueKey(lambdaInformation.content_method_name, lambdaInformation.content_method_descriptor); anonymousClassType = new VarType(lambda_class_name, true); boolean is_method_reference = (content_class_name != classStruct.qualifiedName); if (!is_method_reference) { // content method in the same class, check synthetic flag StructMethod mt = classStruct.getMethod(content_method_name, content_method_descriptor); is_method_reference = !mt.isSynthetic(); // if not synthetic -> method reference } lambdaInformation.is_method_reference = is_method_reference; lambdaInformation.is_content_method_static = (lambdaInformation.content_method_invocation_type == CodeConstants.CONSTANT_MethodHandle_REF_invokeStatic); // FIXME: redundant? }
attr.getMethodName() != null && node.classStruct.qualifiedName.equals(attr.getClassName()) && node.classStruct.getMethod(attr.getMethodName(), attr.getMethodDescriptor()) != null) { child.enclosingMethod = InterpreterUtil.makeUniqueKey(attr.getMethodName(), attr.getMethodDescriptor()); continue;
StructMethod mt = cl.getMethod(node.lambdaInformation.content_method_key); MethodWrapper methodWrapper = wrapper.getMethodWrapper(mt.getName(), mt.getDescriptor()); MethodDescriptor md_content = MethodDescriptor.parseDescriptor(node.lambdaInformation.content_method_descriptor);