/** * Instructs the writer to initialize the field with a specific constructor * invocation, instead of the default GWT.create call. * * @param fieldName the field to initialize * @param args arguments to the constructor call */ public void setFieldInitializerAsConstructor(String fieldName, String... args) { JClassType assignableType = fieldManager.lookup(fieldName).getAssignableType(); setFieldInitializer(fieldName, formatCode("new %s(%s)", assignableType.getQualifiedSourceName(), asCommaSeparatedList(args))); }
/** * Instructs the writer to initialize the field with a specific constructor * invocation, instead of the default GWT.create call. * * @param fieldName the field to initialize * @param args arguments to the constructor call */ public void setFieldInitializerAsConstructor(String fieldName, String... args) { JClassType assignableType = fieldManager.lookup(fieldName).getAssignableType(); setFieldInitializer(fieldName, formatCode("new %s(%s)", assignableType.getQualifiedSourceName(), asCommaSeparatedList(args))); }
/** * Instructs the writer to initialize the field with a specific constructor * invocation, instead of the default GWT.create call. * * @param fieldName the field to initialize * @param args arguments to the constructor call */ public void setFieldInitializerAsConstructor(String fieldName, String... args) { JClassType assignableType = fieldManager.lookup(fieldName).getAssignableType(); setFieldInitializer(fieldName, formatCode("new %s(%s)", assignableType.getQualifiedSourceName(), asCommaSeparatedList(args))); }
/** * Instructs the writer to initialize the field with a specific constructor * invocation, instead of the default GWT.create call. * * @param fieldName the field to initialize * @param args arguments to the constructor call */ public void setFieldInitializerAsConstructor(String fieldName, String... args) { JClassType assignableType = fieldManager.lookup(fieldName).getAssignableType(); setFieldInitializer(fieldName, formatCode("new %s(%s)", assignableType.getQualifiedSourceName(), asCommaSeparatedList(args))); }