Tabnine Logo
AnnotationInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
AnnotationInfo
in
jodd.proxetta

Best Java code snippets using jodd.proxetta.AnnotationInfo (Showing top 17 results out of 315)

origin: oblac/jodd

/**
 * Finds annotation in class info. Returns <code>null</code> if annotation doesn't exist.
 */
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

private static void targetAnnotation(final MethodVisitor mv, final AnnotationInfo[] anns, final String[] args) {
  for (AnnotationInfo ann : anns) {
    String annotationSignature = ann.getAnnotationSignature();
    Method annotationMethod = null;
      Object elementValue = ann.getElement(elementName);
        String annotationClass = ann.getAnnotationClassname();
        String annotationClass = ann.getAnnotationClassname();
origin: oblac/jodd

AnnotationInfo ai = anns[0];
assertSame(ai, ci.getAnnotation(MadvocAction.class));
assertEquals(MadvocAction.class.getName(), ai.getAnnotationClassname());
assertEquals("L" + MadvocAction.class.getName().replace('.', '/') + ";", ai.getAnnotationSignature());
assertEquals("madvocAction", ai.getElement("value"));
ai = anns[1];
assertSame(ai, ci.getAnnotation(PetiteBean.class));
assertEquals(PetiteBean.class.getName(), ai.getAnnotationClassname());
assertEquals("L" + PetiteBean.class.getName().replace('.', '/') + ";", ai.getAnnotationSignature());
ai = anns[2];
assertSame(ai, ci.getAnnotation(InterceptedBy.class));
assertEquals(InterceptedBy.class.getName(), ai.getAnnotationClassname());
assertEquals("L" + InterceptedBy.class.getName().replace('.', '/') + ";", ai.getAnnotationSignature());
assertTrue(ai.getElement("value") instanceof Object[]);
assertFalse(ai.getElement("value") instanceof String[]);
Object c1 = ((Object[]) ai.getElement("value"))[0];
assertEquals("Ljodd/proxetta/fixtures/data/Str;", ((Type) c1).getDescriptor());
assertEquals(Action.class.getName(), ai.getAnnotationClassname());
assertEquals("value", ai.getElement("value"));
assertEquals("alias", ai.getElement("alias"));
assertEquals(PetiteInject.class.getName(), ai.getAnnotationClassname());
assertEquals(0, ai.getElementNames().size());
assertEquals(Transaction.class.getName(), ai.getAnnotationClassname());
assertEquals(2, ai.getElementNames().size());
String s = (String) ai.getElement("propagation");
assertEquals("PROPAGATION_REQUIRES_NEW", s);
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: org.jodd/jodd-proxetta

private static void targetAnnotation(final MethodVisitor mv, final AnnotationInfo[] anns, final String[] args) {
  for (AnnotationInfo ann : anns) {
    String annotationSignature = ann.getAnnotationSignature();
    Method annotationMethod = null;
      Object elementValue = ann.getElement(elementName);
        String annotationClass = ann.getAnnotationClassname();
        String annotationClass = ann.getAnnotationClassname();
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

/**
 * Returns <code>true</code> if class 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

assertEquals(FooAnn.class.getName(), anns[0].getAnnotationClassname());
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-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-wot

/**
 * Returns <code>true</code> if class is annotated with one of provided annotation.
 */
public boolean hasAnnotation(ClassInfo classInfo, Class<? extends Annotation>... an) {
  AnnotationInfo[] anns = classInfo.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-proxetta

/**
 * Finds annotation in class info. Returns <code>null</code> if annotation doesn't exist.
 */
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-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-wot

/**
 * Finds annotation in class info. Returns <code>null</code> if annotation doesn't exist.
 */
public AnnotationInfo getAnnotation(ClassInfo classInfo, Class<? extends Annotation> an) {
  AnnotationInfo[] anns = classInfo.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-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;
}
origin: org.jodd/jodd-proxetta

/**
 * Returns <code>true</code> if class 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;
}
jodd.proxettaAnnotationInfo

Javadoc

Annotation information.

Most used methods

  • getAnnotationClassname
  • getAnnotationSignature
  • getElement
    Lookups for annotation element. May return:String - for simple values,Object[] - for array valuesStr
  • getElementNames
    Returns annotation element names.

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JOptionPane (javax.swing)
  • Github Copilot 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