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

How to use
getAnnotations
method
in
jodd.proxetta.MethodInfo

Best Java code snippets using jodd.proxetta.MethodInfo.getAnnotations (Showing top 10 results out of 315)

origin: oblac/jodd

/**
 * Visits replacement code for {@link ProxyTarget#targetMethodAnnotation(String, String)}.
 */
public static void targetMethodAnnotation(final MethodVisitor mv, final MethodInfo methodInfo, final String[] args) {
  AnnotationInfo[] anns = methodInfo.getAnnotations();
  if (anns != null) {
    targetAnnotation(mv, anns, args);
  }
}
origin: oblac/jodd

/**
 * Returns <code>true</code> if method is annotated with provided annotation.
 */
default AnnotationInfo getAnnotation(final Class<? extends Annotation> an) {
  AnnotationInfo[] anns = getAnnotations();
  if (anns == null) {
    return null;
  }
  String anName = an.getName();
  for (AnnotationInfo ann : anns) {
    if (ann.getAnnotationClassname().equals(anName)) {
      return ann;
    }
  }
  return null;
}
origin: oblac/jodd

/**
 * Returns <code>true</code> if method is annotated with one of provided annotation.
 */
default boolean hasAnnotation(final Class<? extends Annotation>... an) {
  AnnotationInfo[] anns = getAnnotations();
  if (anns == null) {
    return false;
  }
  for (Class<? extends Annotation> annotationClass : an) {
    String anName = annotationClass.getName();
    for (AnnotationInfo ann : anns) {
      if (ann.getAnnotationClassname().equals(anName)) {
        return true;
      }
    }
  }
  return false;
}
origin: oblac/jodd

@Test
void testMethodSignature10() throws IOException {
  MethodInfo msv = getMethodSignatureForSingleMethod(M10.class);
  assertEquals(2, msv.getArgumentsCount());
  assertEquals(0, msv.getArgument(1).getAnnotations().length);
  assertEquals(1, msv.getArgument(2).getAnnotations().length);
  assertEquals("jodd.proxetta.fixtures.data.FooAnn", msv.getArgument(2).getAnnotations()[0].getAnnotationClassname());
  assertEquals("macka", msv.getMethodName());
  assertEquals(1, msv.getAnnotations().length);
  assertEquals("jodd.proxetta.fixtures.data.FooAnn", msv.getAnnotations()[0].getAnnotationClassname());
}
origin: oblac/jodd

AnnotationInfo[] anns = mi.getAnnotations();
assertNotNull(anns);
assertEquals(3, anns.length);
AnnotationInfo[] anns = mi.getAnnotations();
assertNotNull(anns);
assertEquals(3, anns.length);
origin: org.jodd/jodd-proxetta

/**
 * Visits replacement code for {@link ProxyTarget#targetMethodAnnotation(String, String)}.
 */
public static void targetMethodAnnotation(final MethodVisitor mv, final MethodInfo methodInfo, final String[] args) {
  AnnotationInfo[] anns = methodInfo.getAnnotations();
  if (anns != null) {
    targetAnnotation(mv, anns, args);
  }
}
origin: org.jodd/jodd-wot

/**
 * Returns <code>true</code> if method is annotated with provided annotation.
 */
public AnnotationInfo getAnnotation(MethodInfo methodInfo, Class<? extends Annotation> mi) {
  AnnotationInfo[] anns = methodInfo.getAnnotations();
  if (anns == null) {
    return null;
  }
  String anName = mi.getName();
  for (AnnotationInfo ann : anns) {
    if (ann.getAnnotationClassname().equals(anName)) {
      return ann;
    }
  }
  return null;
}
origin: org.jodd/jodd-proxetta

/**
 * Returns <code>true</code> if method is annotated with provided annotation.
 */
default AnnotationInfo getAnnotation(final Class<? extends Annotation> an) {
  AnnotationInfo[] anns = getAnnotations();
  if (anns == null) {
    return null;
  }
  String anName = an.getName();
  for (AnnotationInfo ann : anns) {
    if (ann.getAnnotationClassname().equals(anName)) {
      return ann;
    }
  }
  return null;
}
origin: org.jodd/jodd-proxetta

/**
 * Returns <code>true</code> if method is annotated with one of provided annotation.
 */
default boolean hasAnnotation(final Class<? extends Annotation>... an) {
  AnnotationInfo[] anns = getAnnotations();
  if (anns == null) {
    return false;
  }
  for (Class<? extends Annotation> annotationClass : an) {
    String anName = annotationClass.getName();
    for (AnnotationInfo ann : anns) {
      if (ann.getAnnotationClassname().equals(anName)) {
        return true;
      }
    }
  }
  return false;
}
origin: org.jodd/jodd-wot

/**
 * Returns <code>true</code> if method is annotated with one of provided annotation.
 */
public boolean hasAnnotation(MethodInfo methodInfo, Class<? extends Annotation>... an) {
  AnnotationInfo[] anns = methodInfo.getAnnotations();
  if (anns == null) {
    return false;
  }
  for (Class<? extends Annotation> annotationClass : an) {
    String anName = annotationClass.getName();
    for (AnnotationInfo ann : anns) {
      if (ann.getAnnotationClassname().equals(anName)) {
        return true;
      }
    }
  }
  return false;
}
jodd.proxettaMethodInfogetAnnotations

Javadoc

Returns annotation information, if there is any.

Popular methods of MethodInfo

  • getArgumentsCount
    Returns number of method arguments.
  • getMethodName
    Returns method name.
  • getReturnType
    Returns return TypeInfo.
  • getArgument
    Returns methods argument (1-indexed).
  • isPublicMethod
    Returns true if method is public.
  • getClassname
    Returns bytecode-like class name.
  • getDeclaredClassName
    Returns declared class name for inner methods or #getClassname() for top-level methods.
  • getSignature
    Returns java-like method signature.
  • isTopLevelMethod
    Returns true if method is declared in top-level class.
  • getAccessFlags
    Returns methods access flags.
  • getClassInfo
    Returns target jodd.proxetta.ClassInfo.
  • getDescription
    Returns bytecode-like method description.
  • getClassInfo,
  • getDescription,
  • getExceptions,
  • getAllArgumentsSize,
  • getArgumentOffset,
  • hasAnnotation,
  • hasNoArguments,
  • hasOneArgument,
  • hasReturnValue

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getContentResolver (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • From CI to AI: The AI layer in your organization
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