public String getGenericReturnType() { String use = descriptor.toString(); if (signature != null) use = signature; Matcher m = METHOD_DESCRIPTOR.matcher(use); if (!m.matches()) throw new IllegalArgumentException("Not a valid method descriptor: " + descriptor); String returnType = m.group(2); return objectDescriptorToFQN(returnType); }
public String getGenericReturnType() { String use = descriptor.toString(); if (signature != null) use = signature; Matcher m = METHOD_DESCRIPTOR.matcher(use); if (!m.matches()) throw new IllegalArgumentException("Not a valid method descriptor: " + descriptor); String returnType = m.group(2); return objectDescriptorToFQN(returnType); }
private void valueToProperty(String name, Object value, boolean isClass, boolean isCharacter) { if (isClass) { value = Clazz.objectDescriptorToFQN((String) value); } Class<?> typeClass = isCharacter? Character.class: value.getClass(); //enums already come out as the enum name, no processing needed. String type = typeClass.getSimpleName(); component.propertyType.put(name, type); props.add(name, value.toString()); }
public String getGenericReturnType() { String use = descriptor.toString(); if (signature != null) use = signature; Matcher m = METHOD_DESCRIPTOR.matcher(use); if (!m.matches()) throw new IllegalArgumentException("Not a valid method descriptor: " + descriptor); String returnType = m.group(2); return objectDescriptorToFQN(returnType); }
private void valueToProperty(String name, Object value, boolean isClass, boolean isCharacter) { if (isClass) { value = Clazz.objectDescriptorToFQN((String) value); } Class<?> typeClass = isCharacter? Character.class: value.getClass(); //enums already come out as the enum name, no processing needed. String type = typeClass.getSimpleName(); component.propertyType.put(name, type); props.add(name, value.toString()); }
public static String objectDescriptorToFQN(String string) { if (string.startsWith("L") && string.endsWith(";")) return string.substring(1, string.length() - 1).replace('/', '.'); switch (string.charAt(0)) { case 'V' : return "void"; case 'B' : return "byte"; case 'C' : return "char"; case 'I' : return "int"; case 'S' : return "short"; case 'D' : return "double"; case 'F' : return "float"; case 'J' : return "long"; case 'Z' : return "boolean"; case '[' : // Array return objectDescriptorToFQN(string.substring(1)) + "[]"; } throw new IllegalArgumentException("Invalid type character in descriptor " + string); }
public static String objectDescriptorToFQN(String string) { if ((string.startsWith("L") || string.startsWith("T")) && string.endsWith(";")) return string.substring(1, string.length() - 1) .replace('/', '.'); switch (string.charAt(0)) { case 'V' : return "void"; case 'B' : return "byte"; case 'C' : return "char"; case 'I' : return "int"; case 'S' : return "short"; case 'D' : return "double"; case 'F' : return "float"; case 'J' : return "long"; case 'Z' : return "boolean"; case '[' : // Array return objectDescriptorToFQN(string.substring(1)) + "[]"; } throw new IllegalArgumentException("Invalid type character in descriptor " + string); }
public static String objectDescriptorToFQN(String string) { if ((string.startsWith("L") || string.startsWith("T")) && string.endsWith(";")) return string.substring(1, string.length() - 1).replace('/', '.'); switch (string.charAt(0)) { case 'V' : return "void"; case 'B' : return "byte"; case 'C' : return "char"; case 'I' : return "int"; case 'S' : return "short"; case 'D' : return "double"; case 'F' : return "float"; case 'J' : return "long"; case 'Z' : return "boolean"; case '[' : // Array return objectDescriptorToFQN(string.substring(1)) + "[]"; } throw new IllegalArgumentException("Invalid type character in descriptor " + string); }
public static String objectDescriptorToFQN(String string) { if ((string.startsWith("L") || string.startsWith("T")) && string.endsWith(";")) return string.substring(1, string.length() - 1).replace('/', '.'); switch (string.charAt(0)) { case 'V' : return "void"; case 'B' : return "byte"; case 'C' : return "char"; case 'I' : return "int"; case 'S' : return "short"; case 'D' : return "double"; case 'F' : return "float"; case 'J' : return "long"; case 'Z' : return "boolean"; case '[' : // Array return objectDescriptorToFQN(string.substring(1)) + "[]"; } throw new IllegalArgumentException("Invalid type character in descriptor " + string); }
public static String objectDescriptorToFQN(String string) { if ((string.startsWith("L") || string.startsWith("T")) && string.endsWith(";")) return string.substring(1, string.length() - 1) .replace('/', '.'); switch (string.charAt(0)) { case 'V' : return "void"; case 'B' : return "byte"; case 'C' : return "char"; case 'I' : return "int"; case 'S' : return "short"; case 'D' : return "double"; case 'F' : return "float"; case 'J' : return "long"; case 'Z' : return "boolean"; case '[' : // Array return objectDescriptorToFQN(string.substring(1)) + "[]"; } throw new IllegalArgumentException("Invalid type character in descriptor " + string); }
if (matcher.matches()) { String type = matcher.group(2); if (rdef.service.equals(Clazz.objectDescriptorToFQN(type)) || type.equals("Ljava/util/Map;") || type.equals("Lorg/osgi/framework/ServiceReference;")) {
Matcher m = COLLECTION.matcher(rtype); if (m.matches()) { rtype = Clazz.objectDescriptorToFQN(m.group(3)); ad.cardinality = Integer.MIN_VALUE;
def.service = Clazz.objectDescriptorToFQN(def.service); } else {
Matcher m = COLLECTION.matcher(rtype); if (m.matches()) { rtype = Clazz.objectDescriptorToFQN(m.group(3)); ad.cardinality = Integer.MIN_VALUE;
annoService = Clazz.objectDescriptorToFQN(annoService); ReferenceScope scope = reference.scope();
annoService = Clazz.objectDescriptorToFQN(annoService); ReferenceScope scope = reference.scope();
Matcher m = COLLECTION.matcher(rtype); if (m.matches()) { rtype = Clazz.objectDescriptorToFQN(m.group(3)); cardinality = Integer.MIN_VALUE;
Matcher m = COLLECTION.matcher(rtype); if (m.matches()) { rtype = Clazz.objectDescriptorToFQN(m.group(3)); cardinality = Integer.MIN_VALUE;
Matcher m = COLLECTION.matcher(rtype); if (m.matches()) { rtype = Clazz.objectDescriptorToFQN(m.group(3)); cardinality = Integer.MIN_VALUE;
Matcher m = COLLECTION.matcher(rtype); if (m.matches()) { rtype = Clazz.objectDescriptorToFQN(m.group(3)); cardinality = Integer.MIN_VALUE;