List of usage examples for com.google.gwt.core.ext.typeinfo JConstructor getAnnotation
<T extends Annotation> T getAnnotation(Class<T> annotationClass);
null if it is not. From source file:fr.onevu.gwt.uibinder.rebind.model.OwnerFieldClass.java
License:Apache License
/** * Finds the constructor annotated with @UiConcontructor if there is one, and * puts it in the {@link #uiConstructor} field. * /* w w w. j av a 2 s .com*/ * @param fieldType * the type of the field */ private void findUiConstructor(JClassType fieldType) throws UnableToCompleteException { for (JConstructor ctor : fieldType.getConstructors()) { if (ctor.getAnnotation(UiConstructor.class) != null) { if (uiConstructor != null) { logger.die( fieldType.getName() + " has more than one constructor annotated with @UiConstructor"); } uiConstructor = ctor; } } }