@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { JavaType annotationType = bytecodeVisitor.convertAsmType(org.objectweb.asm.Type.getType(desc)); AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); methodSymbol.metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, bytecodeVisitor); }
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { JavaType annotationType = convertAsmType(org.objectweb.asm.Type.getType(desc), Flags.ANNOTATION); AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); classSymbol.metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, this); }
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { JavaType annotationType = bytecodeVisitor.convertAsmType(org.objectweb.asm.Type.getType(desc), Flags.ANNOTATION); AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); fieldSymbol.metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, bytecodeVisitor); }
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { JavaType annotationType = bytecodeVisitor.convertAsmType(org.objectweb.asm.Type.getType(desc), Flags.ANNOTATION); AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); methodSymbol.metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, bytecodeVisitor); }
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { JavaType annotationType = convertAsmType(org.objectweb.asm.Type.getType(desc)); AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); classSymbol.metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, this); }
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { JavaType annotationType = convertAsmType(org.objectweb.asm.Type.getType(desc)); AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); classSymbol.metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, this); }
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { JavaType annotationType = convertAsmType(org.objectweb.asm.Type.getType(desc), Flags.ANNOTATION); AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); classSymbol.metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, this); }
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { JavaType annotationType = bytecodeVisitor.convertAsmType(org.objectweb.asm.Type.getType(desc)); AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); fieldSymbol.metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, bytecodeVisitor); }
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { JavaType annotationType = bytecodeVisitor.convertAsmType(org.objectweb.asm.Type.getType(desc)); AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); fieldSymbol.metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, bytecodeVisitor); }
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { JavaType annotationType = bytecodeVisitor.convertAsmType(org.objectweb.asm.Type.getType(desc)); AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); methodSymbol.metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, bytecodeVisitor); }
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { JavaType annotationType = bytecodeVisitor.convertAsmType(org.objectweb.asm.Type.getType(desc), Flags.ANNOTATION); AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); methodSymbol.metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, bytecodeVisitor); }
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { JavaType annotationType = bytecodeVisitor.convertAsmType(org.objectweb.asm.Type.getType(desc), Flags.ANNOTATION); AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); fieldSymbol.metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, bytecodeVisitor); }
@Override public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) { JavaType annotationType = bytecodeVisitor.convertAsmType(org.objectweb.asm.Type.getType(desc), Flags.ANNOTATION); if (annotationType.is("java.lang.Synthetic")) { syntheticArgs++; } else { AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); methodSymbol.getParameters().scopeSymbols().get(parameter - syntheticArgs).metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, bytecodeVisitor); } return null; }
@Override public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) { JavaType annotationType = bytecodeVisitor.convertAsmType(org.objectweb.asm.Type.getType(desc), Flags.ANNOTATION); if (annotationType.is("java.lang.Synthetic")) { syntheticArgs++; } else { AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); methodSymbol.getParameters().scopeSymbols().get(parameter - syntheticArgs).metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, bytecodeVisitor); } return null; }
@Override public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) { JavaType annotationType = bytecodeVisitor.convertAsmType(org.objectweb.asm.Type.getType(desc)); if (annotationType.is("java.lang.Synthetic")) { syntheticArgs++; } else { AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); methodSymbol.getParameters().scopeSymbols().get(parameter - syntheticArgs).metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, bytecodeVisitor); } return null; } }
@Override public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) { JavaType annotationType = bytecodeVisitor.convertAsmType(org.objectweb.asm.Type.getType(desc)); if (annotationType.is("java.lang.Synthetic")) { syntheticArgs++; } else { AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve(annotationType.getSymbol()); methodSymbol.getParameters().scopeSymbols().get(parameter - syntheticArgs).metadata().addAnnotation(annotationInstance); return new BytecodeAnnotationVisitor(annotationInstance, bytecodeVisitor); } return null; } }
private void completeMetadata(JavaSymbol symbol, List<AnnotationTree> annotations) { for (AnnotationTree tree : annotations) { AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve((JavaSymbol.TypeJavaSymbol) tree.symbolType().symbol()); symbol.metadata().addAnnotation(annotationInstance); if (tree.arguments().size() > 1 || (!tree.arguments().isEmpty() && tree.arguments().get(0).is(Tree.Kind.ASSIGNMENT))) { for (ExpressionTree expressionTree : tree.arguments()) { AssignmentExpressionTree aet = (AssignmentExpressionTree) expressionTree; //TODO: Store more precise value than the expression (real value in case of literal, symbol for enums, array of values, solve constants?) annotationInstance.addValue(new AnnotationValueResolve(((IdentifierTree) aet.variable()).name(), aet.expression())); } } else { //Constant addConstantValue(tree, annotationInstance); } } }
private static void completeMetadata(JavaSymbol symbol, List<AnnotationTree> annotations) { for (AnnotationTree tree : annotations) { AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve((JavaSymbol.TypeJavaSymbol) tree.symbolType().symbol()); symbol.metadata().addAnnotation(annotationInstance); Arguments arguments = tree.arguments(); if (arguments.size() > 1 || (!arguments.isEmpty() && arguments.get(0).is(Tree.Kind.ASSIGNMENT))) { for (ExpressionTree expressionTree : arguments) { AssignmentExpressionTree aet = (AssignmentExpressionTree) expressionTree; // TODO: Store more precise value than the expression (real value in case of literal, symbol for enums, array of values, solve constants?) annotationInstance.addValue(new AnnotationValueResolve(((IdentifierTree) aet.variable()).name(), aet.expression())); } } else { // Constant addConstantValue(tree, annotationInstance); } } }
private static void completeMetadata(JavaSymbol symbol, List<AnnotationTree> annotations) { for (AnnotationTree tree : annotations) { AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve((JavaSymbol.TypeJavaSymbol) tree.symbolType().symbol()); symbol.metadata().addAnnotation(annotationInstance); Arguments arguments = tree.arguments(); if (arguments.size() > 1 || (!arguments.isEmpty() && arguments.get(0).is(Tree.Kind.ASSIGNMENT))) { for (ExpressionTree expressionTree : arguments) { AssignmentExpressionTree aet = (AssignmentExpressionTree) expressionTree; // TODO: Store more precise value than the expression (real value in case of literal, symbol for enums, array of values, solve constants?) annotationInstance.addValue(new AnnotationValueResolve(((IdentifierTree) aet.variable()).name(), aet.expression())); } } else { // Constant addConstantValue(tree, annotationInstance); } } }
private static void completeMetadata(JavaSymbol symbol, List<AnnotationTree> annotations) { for (AnnotationTree tree : annotations) { AnnotationInstanceResolve annotationInstance = new AnnotationInstanceResolve((JavaSymbol.TypeJavaSymbol) tree.symbolType().symbol()); symbol.metadata().addAnnotation(annotationInstance); Arguments arguments = tree.arguments(); if (arguments.size() > 1 || (!arguments.isEmpty() && arguments.get(0).is(Tree.Kind.ASSIGNMENT))) { for (ExpressionTree expressionTree : arguments) { AssignmentExpressionTree aet = (AssignmentExpressionTree) expressionTree; // TODO: Store more precise value than the expression (real value in case of literal, symbol for enums, array of values, solve constants?) annotationInstance.addValue(new AnnotationValueResolve(((IdentifierTree) aet.variable()).name(), aet.expression())); } } else { // Constant addConstantValue(tree, annotationInstance); } } }