Examples of EmptyMethodVisitor


Examples of com.comphenix.protocol.reflect.compiler.EmptyMethodVisitor

      public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
        final String methodName = name;
       
        // Detect read/write calls to NBTTagCompound
        if (expectedDesc.equals(desc)) {
          return new EmptyMethodVisitor() {
            private int readMethods;
            private int writeMethods;
           
            public void visitMethodInsn(int opcode, String owner, String name, String desc) {
              // This must be a virtual call on NBTTagCompound that accepts a String
View Full Code Here

Examples of com.comphenix.protocol.reflect.compiler.EmptyMethodVisitor

    reader.accept(new EmptyClassVisitor() {
      @Override
      public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
        // Check method
        if (methodName.equals(name) && methodDescription.equals(desc)) {
          return new EmptyMethodVisitor() {
            @Override
            public void visitMethodInsn(int opcode, String owner, String name, String desc) {
              output.add(new AsmMethod(AsmOpcodes.fromIntOpcode(opcode), owner, methodName, desc));
            }
          };
View Full Code Here

Examples of com.comphenix.protocol.reflect.compiler.EmptyMethodVisitor

        reader.accept(new EmptyClassVisitor() {
          @Override
          public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
            // The read method
            if (desc.startsWith("(Ljava/io/DataInput")) {
              return new EmptyMethodVisitor() {
                public void visitMethodInsn(int opcode, String owner, String name, String desc) {
                  if (opcode == Opcodes.INVOKESPECIAL && isConstructor(name)) {
                    String className = owner.replace('/', '.');
                   
                    // Use signature to distinguish between constructors
View Full Code Here

Examples of jodd.asm.EmptyMethodVisitor

          };
        }

        // Parse EXECUTE method, just to gather some info, real parsing will come later
        //return new MethodAdapter(new EmptyMethodVisitor()) {    // toask may we replace this with the following code?
        return new EmptyMethodVisitor() {
          @Override
          public void visitVarInsn(int opcode, int var) {
            if (isStoreOpcode(opcode)) {
              if (var > maxLocalVarOffset) {
                maxLocalVarOffset = var;          // find max local var offset
View Full Code Here

Examples of jodd.asm.EmptyMethodVisitor

          };
        }

        // Parse EXECUTE method, just to gather some info, real parsing will come later
        //return new MethodAdapter(new EmptyMethodVisitor()) {    // toask may we replace this with the following code?
        return new EmptyMethodVisitor() {
          @Override
          public void visitVarInsn(int opcode, int var) {
            if (isStoreOpcode(opcode)) {
              if (var > maxLocalVarOffset) {
                maxLocalVarOffset = var;          // find max local var offset
View Full Code Here

Examples of org.springframework.ide.eclipse.core.type.asm.EmptyMethodVisitor

    private boolean isConstructorAutowired = false;

    @Override
    public MethodVisitor visitMethod(int modifier, String name, String params, String arg3, String[] arg4) {
      if (CONSTRUCTOR_NAME.equals(name)) {
        return new EmptyMethodVisitor() {
          @Override
          public AnnotationVisitor visitAnnotation(final String desc, boolean visible) {
            if (AUTOWIRED_NAME.equals(desc)) {
              isConstructorAutowired = true;
            }
            else if (INJECT_NAME.equals(desc)) {
              isConstructorAutowired = true;
            }
            return new EmptyAnnotationVisitor();
          }
        };
      }
      return new EmptyMethodVisitor();
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.core.type.asm.EmptyMethodVisitor

  public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, String[] exceptions) {
    String methodKey = name + desc;
    if (!visitedMethods.contains(methodKey)) {
      visitedMethods.add(methodKey);

      return new EmptyMethodVisitor() {
        @Override
        public AnnotationVisitor visitAnnotation(final String annotationDesc, boolean visible) {
          final String annotationClass = Type.getType(annotationDesc).getClassName();
          final IMethod method = getMethodFromSignature(name, desc);
View Full Code Here

Examples of org.springframework.ide.eclipse.core.type.asm.EmptyMethodVisitor

    }

    @Override
    public MethodVisitor visitMethod(int modifier, final String name, String params, String arg3, String[] arg4) {
      if (name.startsWith("set")) {
        return new EmptyMethodVisitor() {
          @Override
          public AnnotationVisitor visitAnnotation(final String desc, boolean visible) {
            if (requiredAnnotationTypes.contains(desc)) {
              requiredPropertyNames.add(java.beans.Introspector.decapitalize(name.substring(3)));
            }
            return new EmptyAnnotationVisitor();
          }
        };
      }
      return new EmptyMethodVisitor();
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.core.type.asm.EmptyMethodVisitor

      buf.append(")");
    }

    final String visitedMethod = buf.toString();

    return new EmptyMethodVisitor() {
      @Override
      public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
        if (visible && ANNOTATION_TYPES.containsKey(desc)) {
          final AnnotationAspectDefinition def = new AnnotationAspectDefinition();
          aspectDefinitions.add(def);
View Full Code Here

Examples of org.springframework.ide.eclipse.core.type.asm.EmptyMethodVisitor

  @Override
  public MethodVisitor visitMethod(int access, String name, String desc,
      String signature, String[] exceptions) {
    classInfo.getMethodNames().add(name);
    return new EmptyMethodVisitor();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.