Codota Logo
MethodVisitor.visitParameterAnnotation
Code IndexAdd Codota 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)

  • Common ways to obtain MethodVisitor
private void myMethod () {
MethodVisitor m =
  • Codota IconClassVisitor zuper;zuper.visitMethod(access, name, desc, signature, exceptions)
  • Codota IconClassVisitor cv;String name;String desc;String signature;String[] exceptions;cv.visitMethod(access, name, desc, signature, exceptions)
  • Codota IconClassVisitor cv;cv.visitMethod(access, "<init>", "()V", null, null)
  • Smart code suggestions by Codota
}
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

  • Reactive rest calls using spring rest template
  • onRequestPermissionsResult (Fragment)
  • orElseThrow (Optional)
  • findViewById (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Kernel (java.awt.image)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now