private static String maybeGetJsExportName(Annotation[] annotations, String calculatedName) { AnnotationBinding jsExport = JdtUtil.getAnnotation(annotations, JSEXPORT_CLASS); if (jsExport == null) { return null; } String value = JdtUtil.getAnnotationParameterString(jsExport, "value"); return Strings.isNullOrEmpty(value) ? calculatedName : value; }
public static String resolveExpression( String instance, String path, String prefix, String suffix) { String expression = path.replace(".", "().") + "()"; if (!Strings.isNullOrEmpty(instance)) { expression = instance + "." + expression; } if (!Strings.isNullOrEmpty(prefix)) { expression = "\"" + Generator.escape(prefix) + "\" + " + expression; } if (!Strings.isNullOrEmpty(suffix)) { expression += " + \"" + Generator.escape(suffix) + "\""; } return expression; }