Codota Logo
MethodInfo.getAnnotations
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
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

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
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