congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
MethodVisitor.visitParameterAnnotation
Code IndexAdd Tabnine to your IDE (free)

How to use
visitParameterAnnotation
method
in
org.objectweb.asm.MethodVisitor

Best Java code snippets using org.objectweb.asm.MethodVisitor.visitParameterAnnotation (Showing top 20 results out of 450)

origin: org.ow2.asm/asm

/**
 * Visits an annotation of a parameter this method.
 *
 * @param parameter the parameter index. This index must be strictly smaller than the number of
 *     parameters in the method descriptor, and strictly smaller than the parameter count
 *     specified in {@link #visitAnnotableParameterCount}. Important note: <i>a parameter index i
 *     is not required to correspond to the i'th parameter descriptor in the method
 *     descriptor</i>, in particular in case of synthetic parameters (see
 *     https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.18).
 * @param descriptor the class descriptor of the annotation class.
 * @param visible {@literal true} if the annotation is visible at runtime.
 * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not
 *     interested in visiting this annotation.
 */
public AnnotationVisitor visitParameterAnnotation(
  final int parameter, final String descriptor, final boolean visible) {
 if (mv != null) {
  return mv.visitParameterAnnotation(parameter, descriptor, visible);
 }
 return null;
}
origin: cglib/cglib

public AnnotationVisitor visitParameterAnnotation(int parameter,
                         String desc,
                         boolean visible) {
  return AnnotationVisitorTee.getInstance(mv1.visitParameterAnnotation(parameter, desc, visible),
                      mv2.visitParameterAnnotation(parameter, desc, visible));
}
origin: cglib/cglib

public AnnotationVisitor visitParameterAnnotation(int parameter,
                         String desc,
                         boolean visible) {
  return AnnotationVisitorTee.getInstance(mv1.visitParameterAnnotation(parameter, desc, visible),
                      mv2.visitParameterAnnotation(parameter, desc, visible));
}
origin: pxb1988/dex2jar

public static void acceptParameter(DexAnnotationNode ann, int index, MethodVisitor v) {
  AnnotationVisitor av = v.visitParameterAnnotation(index, ann.type, ann.visibility != Visibility.BUILD);
  if (av != null) {
    accept(ann.items, av);
    av.visitEnd();
  }
}
origin: kilim/kilim

an.accept(mv.visitParameterAnnotation(i, an.desc, true));
an.accept(mv.visitParameterAnnotation(i, an.desc, false));
origin: org.ow2.asm/asm

methodVisitor.visitParameterAnnotation(i, annotationDescriptor, visible),
currentOffset,
/* named = */ true,
origin: Sable/soot

AnnotationVisitor av = mv.visitParameterAnnotation(j, at.getType(),
  (va.getVisibility() == AnnotationConstants.RUNTIME_VISIBLE));
generateAnnotationElems(av, at.getElems(), true);
origin: com.google.gwt/gwt-servlet

@Override
public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) {
 desc = processDescriptor(sourceType, desc);
 return super.visitParameterAnnotation(parameter, desc, visible);
}
origin: micronaut-projects/micronaut-core

AnnotationVisitor interceptorTypeAnn = constructorWriter.visitParameterAnnotation(
  interceptorArgumentIndex, Type.getDescriptor(io.micronaut.context.annotation.Type.class), true
).visitArray("value");
origin: glowroot/glowroot

private static void addOnAfterMethodTimerOnly(ClassWriter cw) {
  MethodVisitor mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "onAfter",
      "(Lorg/glowroot/agent/plugin/api/Timer;)V", null, null);
  visitAnnotation(mv, "Lorg/glowroot/agent/plugin/api/weaving/OnAfter;");
  checkNotNull(mv.visitParameterAnnotation(0,
      "Lorg/glowroot/agent/plugin/api/weaving/BindTraveler;", true)).visitEnd();
  mv.visitCode();
  mv.visitVarInsn(ALOAD, 0);
  mv.visitMethodInsn(INVOKEINTERFACE, "org/glowroot/agent/plugin/api/Timer", "stop", "()V",
      true);
  mv.visitInsn(RETURN);
  mv.visitMaxs(0, 0);
  mv.visitEnd();
}
origin: glowroot/glowroot

private void addOnThrowMethod(ClassWriter cw) {
  MethodVisitor mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "onThrow",
      "(Ljava/lang/Throwable;Lorg/glowroot/agent/plugin/api/TraceEntry;)V", null, null);
  visitAnnotation(mv, "Lorg/glowroot/agent/plugin/api/weaving/OnThrow;");
  checkNotNull(mv.visitParameterAnnotation(0,
      "Lorg/glowroot/agent/plugin/api/weaving/BindThrowable;", true)).visitEnd();
  checkNotNull(mv.visitParameterAnnotation(1,
      "Lorg/glowroot/agent/plugin/api/weaving/BindTraveler;", true)).visitEnd();
  mv.visitCode();
  if (!config.traceEntryEnabledProperty().isEmpty()) {
    mv.visitVarInsn(ALOAD, 1);
    Label l0 = new Label();
    mv.visitJumpInsn(IFNONNULL, l0);
    mv.visitInsn(RETURN);
    mv.visitLabel(l0);
  }
  mv.visitVarInsn(ALOAD, 1);
  mv.visitVarInsn(ALOAD, 0);
  mv.visitMethodInsn(INVOKEINTERFACE, "org/glowroot/agent/plugin/api/TraceEntry",
      "endWithError", "(Ljava/lang/Throwable;)V", true);
  mv.visitInsn(RETURN);
  mv.visitMaxs(0, 0);
  mv.visitEnd();
}
origin: glowroot/glowroot

visitAnnotation(mv, "Lorg/glowroot/agent/plugin/api/weaving/OnBefore;");
if (methodMetaInternalName != null) {
  checkNotNull(mv.visitParameterAnnotation(1,
      "Lorg/glowroot/agent/plugin/api/weaving/BindReceiver;", true)).visitEnd();
  checkNotNull(mv.visitParameterAnnotation(2,
      "Lorg/glowroot/agent/plugin/api/weaving/BindMethodName;", true)).visitEnd();
  checkNotNull(mv.visitParameterAnnotation(3,
      "Lorg/glowroot/agent/plugin/api/weaving/BindParameterArray;", true)).visitEnd();
  checkNotNull(mv.visitParameterAnnotation(4,
      "Lorg/glowroot/agent/plugin/api/weaving/BindMethodMeta;", true)).visitEnd();
origin: hcoles/pitest

@Test
public void shouldForwardVisitParameterAnnotationToChild() {
 getTesteeVisitor().visitParameterAnnotation(1, "foo", false);
 verify(this.mv).visitParameterAnnotation(1, "foo", false);
}
origin: glowroot/glowroot

    "(Lorg/glowroot/agent/plugin/api/weaving/OptionalReturn;" + travelerType + ")V",
    null, null);
checkNotNull(mv.visitParameterAnnotation(0,
    "Lorg/glowroot/agent/plugin/api/weaving/BindOptionalReturn;", true)).visitEnd();
checkNotNull(mv.visitParameterAnnotation(1,
    "Lorg/glowroot/agent/plugin/api/weaving/BindTraveler;", true)).visitEnd();
int travelerParamIndex = 1;
origin: EvoSuite/evosuite

/** {@inheritDoc} */
@Override
public AnnotationVisitor visitParameterAnnotation(int arg0, String arg1, boolean arg2) {
  mv1.visitParameterAnnotation(arg0, arg1, arg2);
  return mv2.visitParameterAnnotation(arg0, arg1, arg2);
}
origin: cdapio/cdap

@Override
public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) {
 // Memorize all visible annotations for each parameter.
 // It needs to store in a Multimap because there can be multiple annotations per parameter.
 if (visible) {
  AnnotationNode annotationNode = new AnnotationNode(Opcodes.ASM5, desc);
  paramAnnotations.put(parameter, annotationNode);
  return annotationNode;
 }
 return super.visitParameterAnnotation(parameter, desc, visible);
}
origin: org.openl.rules/org.openl.rules.ruleservice.ws

  private void addWebParamAnnotation(MethodVisitor mv, int index, String paramName) {
    AnnotationVisitor av = mv.visitParameterAnnotation(index, Type.getDescriptor(WebParam.class), true);
    av.visit("name", paramName);
    av.visitEnd();
  }
}
origin: org.ow2.asm/asm-commons

@Override
public AnnotationVisitor visitParameterAnnotation(
  final int parameter, final String descriptor, final boolean visible) {
 AnnotationVisitor annotationVisitor =
   super.visitParameterAnnotation(parameter, remapper.mapDesc(descriptor), visible);
 return annotationVisitor == null
   ? annotationVisitor
   : new AnnotationRemapper(api, annotationVisitor, remapper);
}
origin: org.ow2.asm/asm-debug-all

@Override
public AnnotationVisitor visitParameterAnnotation(final int parameter,
    final String desc, final boolean visible) {
  Printer p = this.p.visitParameterAnnotation(parameter, desc, visible);
  AnnotationVisitor av = mv == null ? null : mv.visitParameterAnnotation(
      parameter, desc, visible);
  return new TraceAnnotationVisitor(av, p);
}
origin: org.gradle/gradle-core

  @Override
  public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) {
    ParameterAnnotationMember ann = new ParameterAnnotationMember(desc, visible, parameter);
    methodMember.addParameterAnnotation(ann);
    return new SortingAnnotationVisitor(ann, super.visitParameterAnnotation(parameter, desc, visible));
  }
};
org.objectweb.asmMethodVisitorvisitParameterAnnotation

Javadoc

Visits an annotation of a parameter this method.

Popular methods of MethodVisitor

  • visitMethodInsn
    Visits a method instruction. A method instruction is an instruction that invokes a method.
  • visitInsn
    Visits a zero operand instruction.
  • visitVarInsn
    Visits a local variable instruction. A local variable instruction is an instruction that loads or st
  • visitMaxs
    Visits the maximum stack size and the maximum number of local variables of the method.
  • visitEnd
    Visits the end of the method. This method, which is the last one to be called, is used to inform the
  • visitCode
    Starts the visit of the method's code, if any (i.e. non abstract method).
  • visitFieldInsn
    Visits a field instruction. A field instruction is an instruction that loads or stores the value of
  • visitTypeInsn
    Visits a type instruction. A type instruction is an instruction that takes the internal name of a cl
  • visitLabel
    Visits a label. A label designates the instruction that will be visited just after it.
  • visitLdcInsn
    Visits a LDC instruction. Note that new constant types may be added in future versions of the Java V
  • visitJumpInsn
    Visits a jump instruction. A jump instruction is an instruction that may jump to another instruction
  • visitIntInsn
    Visits an instruction with a single int operand.
  • visitJumpInsn,
  • visitIntInsn,
  • visitLocalVariable,
  • visitAnnotation,
  • visitTryCatchBlock,
  • visitLineNumber,
  • visitFrame,
  • visitTableSwitchInsn,
  • visitIincInsn

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now