getTextMethod = cssResourceInterface.getMethod("getText", new JType[0]); ensuredInjectedMethod = cssResourceInterface.getMethod("ensureInjected", new JType[0]); getNameMethod = resourcePrototypeInterface.getMethod("getName", new JType[0]); } catch (NotFoundException e) { logger.log(TreeLogger.ERROR, "Unable to lookup methods from CssResource and " +
try { String setterMethodName = "set" + propertyName; classType.getMethod( setterMethodName, new JType[] { returnType } ); sourceWriter.println( "if ( names.length == " + nextNameIndex + " ) { " + currentVariableName + StringUtils.SEPARATOR_DOT_CHAR + setterMethodName + "( (" + getWrapperType( returnType ).getParameterizedQualifiedSourceName() + ") value ); return; }" ); } catch ( NotFoundException e ) { try { String setterMethodName = "set" + propertyName; classType.getMethod( setterMethodName, new JType[] { returnType } ); sourceWriter.println( currentVariableName + StringUtils.SEPARATOR_DOT_CHAR + setterMethodName + "( (" + getWrapperType( returnType ).getParameterizedQualifiedSourceName() + ") value );" ); sourceWriter.println( "return;" );
boolean hasGetter(PropertyDescriptor p) { JType[] paramTypes = new JType[]{}; try { jClass.getMethod(GwtSpecificValidatorCreator.asGetter(p), paramTypes); return true; } catch (NotFoundException e) { return false; } }
boolean hasGetter(PropertyDescriptor p) { JType[] paramTypes = new JType[]{}; try { jClass.getMethod(GwtSpecificValidatorCreator.asGetter(p), paramTypes); return true; } catch (NotFoundException e) { return false; } }
boolean hasGetter(final PropertyDescriptor ppropertyDescriptor) { final JType[] paramTypes = new JType[] {}; try { jclass.getMethod(GwtSpecificValidatorCreator.asGetter(ppropertyDescriptor), paramTypes); return true; } catch (final NotFoundException e) { return false; } }
private JMethod findMethod(JClassType type, String methodName) { // TODO Move this and getClassHierarchyBreadthFirst to JClassType for (JClassType nextType : UiBinderWriter.getClassHierarchyBreadthFirst(type)) { try { return nextType.getMethod(methodName, new JType[0]); } catch (NotFoundException e) { /* try parent */ } } return null; }
private JMethod findMethod(JClassType type, String methodName) { // TODO Move this and getClassHierarchyBreadthFirst to JClassType for (JClassType nextType : UiBinderWriter.getClassHierarchyBreadthFirst(type)) { try { return nextType.getMethod(methodName, new JType[0]); } catch (NotFoundException e) { /* try parent */ } } return null; }
public static JMethod getGetter(JClassType beanType, String fieldName) throws NotFoundException { JMethod method = null; try { try { method = beanType.getMethod("get" + getterSetterDeterminator(fieldName), new JType[0]); } catch (NotFoundException e) { method = beanType.getMethod("is" + getterSetterDeterminator(fieldName), new JType[0]); } } catch (NotFoundException e) { JClassType superClass = beanType.getSuperclass(); if (superClass != null) { try { method = getGetter(superClass, fieldName); } catch (NotFoundException e1) { JClassType[] interfaces = beanType.getImplementedInterfaces(); if (interfaces != null && interfaces.length > 0) { for (JClassType intrface : interfaces) { method = getGetter(intrface, fieldName); if (method != null) { break; } } } } } } return method; }
final boolean hasValueOf = false; try { asClass.getMethod("fromString", new JType[] { stringType }); hasFromString = true; } catch (final NotFoundException ignored) {} return ")"; asClass.getMethod("valueOf", new JType[] { stringType }); return ")"; } else { if (hasFromString) { try { name = asClass.getMethod("toString", new JType[0]); } catch (final NotFoundException e) { name = asClass.getMethod("name", new JType[0]); name = asClass.getMethod("name", new JType[0]);
getTextMethod = cssResourceInterface.getMethod("getText", new JType[0]); ensuredInjectedMethod = cssResourceInterface.getMethod("ensureInjected", new JType[0]); getNameMethod = resourcePrototypeInterface.getMethod("getName", new JType[0]); } catch (NotFoundException e) { logger.log(TreeLogger.ERROR, "Unable to lookup methods from CssResource and " +
getTextMethod = cssResourceInterface.getMethod("getText", new JType[0]); ensuredInjectedMethod = cssResourceInterface.getMethod("ensureInjected", new JType[0]); getNameMethod = resourcePrototypeInterface.getMethod("getName", new JType[0]); } catch (NotFoundException e) { logger.log(TreeLogger.ERROR, "Unable to lookup methods from CssResource and " +
public static JMethod getSetter(JClassType beanType, String fieldName, JType fieldType) throws NotFoundException { JMethod method = null; try { method = beanType.getMethod("set" + getterSetterDeterminator(fieldName), new JType[] { fieldType }); if (method.isPrivate()) method = null; } catch (NotFoundException e) { JClassType superClass = beanType.getSuperclass(); if (superClass != null) { try { method = getSetter(superClass, fieldName, fieldType); } catch (NotFoundException e1) { JClassType[] interfaces = beanType.getImplementedInterfaces(); if (interfaces != null && interfaces.length > 0) { for (JClassType intrface : interfaces) { method = getSetter(intrface, fieldName, fieldType); if (method != null) { break; } } } } } } return method; }
if (this.injectableType.getMethod("onModuleLoad", new JType[] {}) != null) { srcWriter.println("super.onModuleLoad();");
if (this.injectableType.getMethod("onModuleLoad", new JType[] {}) != null) { srcWriter.println("super.onModuleLoad();");