Interface(final InterfaceType type, final String annotatedName, final String xmlName, final String openejbLegacy) { this.type = type; this.annotatedName = annotatedName; this.xmlName = xmlName; this.xmlNameCc = Strings.camelCase(xmlName); this.openejbLegacy = openejbLegacy; }
Interface(final InterfaceType type, final String annotatedName, final String xmlName, final String openejbLegacy) { this.type = type; this.annotatedName = annotatedName; this.xmlName = xmlName; this.xmlNameCc = Strings.camelCase(xmlName); this.openejbLegacy = openejbLegacy; }
Interface(InterfaceType type, String annotatedName, String xmlName, String openejbLegacy) { this.type = type; this.annotatedName = annotatedName; this.xmlName = xmlName; this.xmlNameCc = Strings.camelCase(xmlName); this.openejbLegacy = openejbLegacy; }
public static String camelCase(final String string) { return camelCase(string, "-"); }
public static String camelCase(final String string) { return camelCase(string, "-"); }
public String apply(Map<String, String> map) { Matcher matcher = PATTERN.matcher(template); StringBuffer buf = new StringBuffer(); while (matcher.find()) { String key = matcher.group(2); String value = map.get(key); if (key.toLowerCase().endsWith(".lc")) { value = map.get(key.substring(0, key.length() - 3)).toLowerCase(); } else if (key.toLowerCase().endsWith(".uc")) { value = map.get(key.substring(0, key.length() - 3)).toUpperCase(); } else if (key.toLowerCase().endsWith(".cc")) { value = Strings.camelCase(map.get(key.substring(0, key.length() - 3))); } matcher.appendReplacement(buf, value); } matcher.appendTail(buf); return buf.toString(); }
public String apply(final Map<String, String> map) { final Matcher matcher = PATTERN.matcher(template); final StringBuffer buf = new StringBuffer(); while (matcher.find()) { final String key = matcher.group(2); if (key == null) { throw new IllegalStateException("Key is null. Template '" + template + "'"); } String value = map.get(key); if (key.toLowerCase().endsWith(".lc")) { value = map.get(key.substring(0, key.length() - 3)).toLowerCase(); } else if (key.toLowerCase().endsWith(".uc")) { value = map.get(key.substring(0, key.length() - 3)).toUpperCase(); } else if (key.toLowerCase().endsWith(".cc")) { value = Strings.camelCase(map.get(key.substring(0, key.length() - 3))); } if (value == null) { throw new IllegalStateException("Value is null for key '" + key + "'. Template '" + template + "'. Keys: " + Join.join(", ", map.keySet())); } matcher.appendReplacement(buf, value); } matcher.appendTail(buf); return buf.toString(); }
public String apply(final Map<String, String> map) { final Matcher matcher = PATTERN.matcher(template); final StringBuffer buf = new StringBuffer(); while (matcher.find()) { final String key = matcher.group(2); if (key == null) { throw new IllegalStateException("Key is null. Template '" + template + "'"); } String value = map.get(key); if (key.toLowerCase().endsWith(".lc")) { value = map.get(key.substring(0, key.length() - 3)).toLowerCase(); } else if (key.toLowerCase().endsWith(".uc")) { value = map.get(key.substring(0, key.length() - 3)).toUpperCase(); } else if (key.toLowerCase().endsWith(".cc")) { value = Strings.camelCase(map.get(key.substring(0, key.length() - 3))); } if (value == null) { throw new IllegalStateException("Value is null for key '" + key + "'. Template '" + template + "'. Keys: " + Join.join(", ", map.keySet())); } matcher.appendReplacement(buf, value); } matcher.appendTail(buf); return buf.toString(); }
public String apply(final Map<String, String> map) { final Matcher matcher = PATTERN.matcher(template); final StringBuffer buf = new StringBuffer(); while (matcher.find()) { final String key = matcher.group(2); if (key == null) { throw new IllegalStateException("Key is null. Template '" + template + "'"); } String value = map.get(key); if (key.toLowerCase().endsWith(".lc")) { value = map.get(key.substring(0, key.length() - 3)).toLowerCase(); } else if (key.toLowerCase().endsWith(".uc")) { value = map.get(key.substring(0, key.length() - 3)).toUpperCase(); } else if (key.toLowerCase().endsWith(".cc")) { value = Strings.camelCase(map.get(key.substring(0, key.length() - 3))); } if (value == null) { throw new IllegalStateException("Value is null for key '" + key + "'. Template '" + template + "'. Keys: " + Join.join(", ", map.keySet())); } matcher.appendReplacement(buf, value.replace("$", "\\$")); // inner class have a $ we need to escape cause it means sthg for regex } matcher.appendTail(buf); return buf.toString(); }
public String apply(final Map<String, String> map) { final Matcher matcher = PATTERN.matcher(template); final StringBuffer buf = new StringBuffer(); while (matcher.find()) { final String key = matcher.group(2); if (key == null) { throw new IllegalStateException("Key is null. Template '" + template + "'"); } String value = map.get(key); if (key.toLowerCase(Locale.ENGLISH).endsWith(".lc")) { value = map.get(key.substring(0, key.length() - 3)).toLowerCase(Locale.ENGLISH); } else if (key.toLowerCase(Locale.ENGLISH).endsWith(".uc")) { value = map.get(key.substring(0, key.length() - 3)).toUpperCase(Locale.ENGLISH); } else if (key.toLowerCase(Locale.ENGLISH).endsWith(".cc")) { value = Strings.camelCase(map.get(key.substring(0, key.length() - 3))); } if (value == null) { throw new IllegalStateException("Value is null for key '" + key + "'. Template '" + template + "'. Keys: " + Join.join(", ", map.keySet())); } matcher.appendReplacement(buf, value); } matcher.appendTail(buf); return buf.toString(); }
private void checkInterface(RemoteBean b, Class<?> beanClass, String tag, String className) { Class<?> interfce = lookForClass(className, tag, b.getEjbName()); if (interfce == null) return; check_hasDependentClasses(b, className, tag); tag = Strings.lcfirst(Strings.camelCase(tag)); if (isValidInterface(b, interfce, beanClass, tag)); ClassFinder finder = new ClassFinder(interfce); for (Class<? extends Annotation> annotation : beanOnlyAnnotations) { if (interfce.isAnnotationPresent(annotation)){ warn(b, "interface.beanOnlyAnnotation", annotation.getSimpleName(), interfce.getName(), b.getEjbClass()); } for (Method method : finder.findAnnotatedMethods(annotation)) { warn(b, "interfaceMethod.beanOnlyAnnotation", annotation.getSimpleName(), interfce.getName(), method.getName(), b.getEjbClass()); } } }
private void checkInterface(final ClassLoader loader, final RemoteBean b, final Class<?> beanClass, String tag, final String className) { final Class<?> interfce = lookForClass(loader, className, tag, b.getEjbName()); if (interfce == null) { return; } check_hasDependentClasses(b, className, tag); tag = Strings.lcfirst(Strings.camelCase(tag)); isValidInterface(b, interfce, beanClass, tag); final ClassFinder finder = new ClassFinder(interfce); for (final Class<? extends Annotation> annotation : beanOnlyAnnotations) { if (interfce.isAnnotationPresent(annotation)) { warn(b, "interface.beanOnlyAnnotation", annotation.getSimpleName(), interfce.getName(), b.getEjbClass()); } for (final Method method : finder.findAnnotatedMethods(annotation)) { warn(b, "interfaceMethod.beanOnlyAnnotation", annotation.getSimpleName(), interfce.getName(), method.getName(), b.getEjbClass()); } } }
private void checkInterface(final RemoteBean b, final Class<?> beanClass, String tag, final String className) { final Class<?> interfce = lookForClass(className, tag, b.getEjbName()); if (interfce == null) { return; } check_hasDependentClasses(b, className, tag); tag = Strings.lcfirst(Strings.camelCase(tag)); isValidInterface(b, interfce, beanClass, tag); final ClassFinder finder = new ClassFinder(interfce); for (final Class<? extends Annotation> annotation : beanOnlyAnnotations) { if (interfce.isAnnotationPresent(annotation)) { warn(b, "interface.beanOnlyAnnotation", annotation.getSimpleName(), interfce.getName(), b.getEjbClass()); } for (final Method method : finder.findAnnotatedMethods(annotation)) { warn(b, "interfaceMethod.beanOnlyAnnotation", annotation.getSimpleName(), interfce.getName(), method.getName(), b.getEjbClass()); } } }