List of usage examples for com.google.gwt.core.ext.typeinfo HasMetaData getMetaData
@Deprecated String[][] getMetaData(String tagName);
From source file:com.gwtent.gen.reflection.GeneratorHelper.java
License:Apache License
/** * generator metaData/*from ww w . ja v a 2 s . c o m*/ * @param dest field or method or class * @param source source to print code * @param metaData */ public static void addMetaDatas(String dest, SourceWriter source, com.google.gwt.core.ext.typeinfo.HasMetaData metaData) { String[] tags = metaData.getMetaDataTags(); for (int j = 0; j < tags.length; j++) { String[][] metas = metaData.getMetaData(tags[j]); for (int k = 0; k < metas.length; k++) { source.println(dest + ".addMetaData(\"" + tags[j] + "\", " + GeneratorHelper.stringArrayToCode(metas[k]) + ");"); } } }
From source file:rocket.generator.rebind.util.AbstractClassComponent.java
License:Apache License
/** * Returns a read only list view for a list of annotated values from the * given source./*from ww w. ja v a 2s . co m*/ * * @param source * @param annotationName * @return */ protected List<String> getAnnotationValues(final HasMetaData source, final String annotationName) { final String[][] values = source.getMetaData(annotationName); final List<String> list = new ArrayList<String>(); if (null != values) { for (int i = 0; i < values.length; i++) { list.add(values[i][0]); } } return list; }