@Test void test() { var annotations = Ops.class.getAnnotations(); annotations = Opsi.class.getAnnotations(); Assertions.assertEquals(2, annotations.length); Assertions.assertEquals("otherName cuccooo='manu'", GeciAnnotationTools.getValue(annotations[0])); Assertions.assertEquals("x", GeciAnnotationTools.getValue(annotations[1])); }
static String getValue(Annotation annotation) { try { final String rawValue = getRawValue(annotation); final var annotationName = getAnnotationGeciName(annotation); final var value = getValue(CaseTools.lcase(annotationName), rawValue.trim()); for (final var method : getAnnotationDeclaredMethods(annotation)) { if (method.getReturnType().equals(String.class) && !method.getName().equals("value") && !method.getName().equals("toString")) { final String param = geParam(annotation, method); if (param != null && param.length() > 0) { value.append(" ") .append(method.getName()) .append("='") .append(param) .append("'"); } } } return value.toString(); } catch (ClassCastException e) { throw new GeciException("Cannot use '" + annotationName(annotation) + "' as generator annotation.", e); } }
GeciAnnotationTools { static String getValue(Annotation annotation) { try { final String rawValue = getRawValue(annotation); final var annotationName = getAnnotationGeciName(annotation); final var value = getValue(CaseTools.lcase(annotationName), rawValue.trim()); for (final var method : getAnnotationDeclaredMethods(annotation)) { if (method.getReturnType().equals(String.class) && !method.getName().equals("value") && !method.getName().equals("toString")) { final String param = geParam(annotation, method); if (param != null && param.length() > 0) { value.append(" ") .append(method.getName()) .append("='") .append(param) .append("'"); } } } return value.toString(); } catch (ClassCastException e) { throw new GeciException("Cannot use '" + annotationName(annotation) + "' as generator annotation.", e); } } }
GeciAnnotationTools { static String getValue(Annotation annotation) { try { final String rawValue = getRawValue(annotation); final var annotationName = getAnnotationGeciName(annotation); final var value = getValue(CaseTools.lcase(annotationName), rawValue.trim()); for (final var method : getAnnotationDeclaredMethods(annotation)) { if (method.getReturnType().equals(String.class) && !method.getName().equals("value") && !method.getName().equals("toString")) { final String param = geParam(annotation, method); if (param != null && param.length() > 0) { value.append(" ") .append(method.getName()) .append("='") .append(param) .append("'"); } } } return value.toString(); } catch (ClassCastException e) { throw new GeciException("Cannot use '" + annotationName(annotation) + "' as generator annotation.", e); } }  }
GeciAnnotationTools { static String getValue(Annotation annotation) { try { final String rawValue = getRawValue(annotation); final var annotationName = getAnnotationGeciName(annotation); final var value = getValue(CaseTools.lcase(annotationName), rawValue.trim()); for (final var method : getAnnotationDeclaredMethods(annotation)) { if (method.getReturnType().equals(String.class) && !method.getName().equals("value") && !method.getName().equals("toString")) { final String param = geParam(annotation, method); if (param != null && param.length() > 0) { value.append(" ") .append(method.getName()) .append("='") .append(param) .append("'"); } } } return value.toString(); } catch (ClassCastException e) { throw new GeciException("Cannot use '" + annotationName(annotation) + "' as generator annotation.", e); } }  static String[] getGecis(AnnotatedElement element); static boolean isGenerated(AnnotatedElement element); static CompoundParams getParameters(Source source,
                                               String generatorMnemonic,
                                               String prefix,
                                               Pattern nextLine); @Deprecated(/*since = "1.2.0"*/) static CompoundParams getSegmentParameters(Source source,
                                                      String mnemonic); static CompoundParams getParameters(String generatorMnemonic, String string); @Deprecated(/*forRemoval = true*/) static Map<String, String> getParameters(String s); }
GeciAnnotationTools { static String getValue(Annotation annotation) { try { final String rawValue = getRawValue(annotation); final var annotationName = getAnnotationGeciName(annotation); final var value = getValue(CaseTools.lcase(annotationName), rawValue.trim()); for (final var method : getAnnotationDeclaredMethods(annotation)) { if (method.getReturnType().equals(String.class) && !method.getName().equals("value") && !method.getName().equals("toString")) { final String param = geParam(annotation, method); if (param != null && param.length() > 0) { value.append(" ") .append(method.getName()) .append("='") .append(param) .append("'"); } } } return value.toString(); } catch (ClassCastException e) { throw new GeciException("Cannot use '" + annotationName(annotation) + "' as generator annotation.", e); } }  static String[] getGecis(AnnotatedElement element); static boolean isGenerated(AnnotatedElement element); static CompoundParams getParameters(Source source,
                                               String generatorMnemonic,
                                               String prefix,
                                               Pattern nextLine); @Deprecated(/*since = "1.2.0"*/) static CompoundParams getSegmentParameters(Source source,
                                                      String mnemonic); static CompoundParams getParameters(String generatorMnemonic, String string); @Deprecated(/*forRemoval = true*/) static Map<String, String> getParameters(String s);  }