/** * */ protected void doModified() { String methodDescriptor = method.getDescriptor().toString(); boolean hasMapReturnType = false; Matcher m = LIFECYCLEDESCRIPTORDS11.matcher(methodDescriptor); if (m.matches()) { component.modified = method.getName(); component.updateVersion(V1_1); hasMapReturnType = m.group(6) != null; } else { m = LIFECYCLEDESCRIPTORDS13.matcher(methodDescriptor); if (m.matches()) { component.modified = method.getName(); component.updateVersion(V1_3); hasMapReturnType = m.group(4) != null; processAnnotationArguments(methodDescriptor); } else analyzer.error( "Modified method for %s descriptor %s is not acceptable.", clazz, method.getDescriptor()).details(new DeclarativeServicesAnnotationError(className.getFQN(), method.getName(), methodDescriptor, ErrorType.MODIFIED_SIGNATURE_ERROR)); } checkMapReturnType(hasMapReturnType); }
ADDef ad = new ADDef(); ocd.attributes.add(ad); ad.id = fixup(defined.getName()); ad.name = space(defined.getName()); ad.description = ""; String rtype = defined.getGenericReturnType(); ad.type = getType(rtype); if (rtype.endsWith("[]")) { analyzer.error( "AD for %s.%s uses an array of collections in return type (%s), Metatype allows either Vector or array", clazz.getClassName().getFQN(), defined.getName(), defined.getType().getFQN()); Matcher m = COLLECTION.matcher(rtype); if (m.matches()) { analyzer.error( "AD for %s.%s Can not parse option values from type (%s), %s", clazz.getClassName().getFQN(), defined.getName(), defined.getType().getFQN(), e.getMessage());
for (Iterator<MethodDef> i = methods.iterator(); i.hasNext();) { MethodDef m = i.next(); if (m.isSynthetic()) { synthetic.add(m); i.remove(); children = new HashSet<Element>(); access(children, m.getAccess(), m.isDeprecated()); getCovariantReturns(children, m.getType(), m.getGenericReturnType()); String signature = m.getSignature(); Matcher matcher; if (signature !=null && (matcher = PARAMETERS_P.matcher(signature)).matches()) { signature = matcher.group(1); } else signature = toString(m.getPrototype()); if ( clazz.isInterface() && !m.isAbstract()) { Element member = new Element(Type.METHOD, m.getName() + signature, children, add, remove, null);
for (Iterator<MethodDef> i = methods.iterator(); i.hasNext();) { MethodDef m = i.next(); if (m.isSynthetic()) { synthetic.add(m); i.remove(); children = new HashSet<Element>(); access(children, m.getAccess(), m.isDeprecated()); getCovariantReturns(children, m.getType(), m.getGenericReturnType()); String signature = m.getSignature(); Matcher matcher; if (signature !=null && (matcher = PARAMETERS_P.matcher(signature)).matches()) { signature = matcher.group(1); } else signature = toString(m.getPrototype()); if ( clazz.isInterface() && !m.isAbstract()) { Element member = new Element(Type.METHOD, m.getName() + signature, children, add, remove, null);
if (m.isSynthetic()) { // Ignore synthetic methods continue; if ((type == ANNOTATION) && (m.getConstant() != null)) { Object constant = m.getConstant(); String defaultValue; if (constant.getClass() access(children, m.getAccess(), m.isDeprecated(), provider.get()); children.remove(FINAL); children.add(getReturn(m.getType())); if (clazz.isInterface() && !m.isAbstract()) { String signature = m.getName() + toString(m.getPrototype()); Element member = new Element(METHOD, signature, children, add, provider.get() && !m.isPublic() ? MINOR : remove, null);
for (Iterator<MethodDef> i = methods.iterator(); i.hasNext();) { MethodDef m = i.next(); if (m.isSynthetic()) { synthetic.add(m); i.remove(); children = new ArrayList<Element>(); access(children, m.getAccess(), m.isDeprecated()); getCovariantReturns(children, m.getType()); if (s.getName().equals(m.getName()) && Arrays.equals(s.getPrototype(), m.getPrototype())) { i.remove(); getCovariantReturns(children, s.getType()); Element member = new Element(Type.METHOD, m.getName() + toString(m.getPrototype()), children, add, remove, null); if (children == null) children = new ArrayList<Element>(); access(children, m.getAccess(), m.isDeprecated()); getCovariantReturns(children, m.getType()); Element member = new Element(Type.METHOD, m.getName() + toString(m.getPrototype()), children, add, remove, "synthetic");
if (m.isSynthetic()) { // Ignore synthetic methods continue; if ((type == ANNOTATION) && (m.getConstant() != null)) { Object constant = m.getConstant(); String defaultValue; if (constant.getClass() access(children, m.getAccess(), m.isDeprecated(), provider.get()); children.remove(FINAL); children.add(getReturn(m.getType())); if (clazz.isInterface() && !m.isAbstract()) { String signature = m.getName() + toString(m.getPrototype()); Element member = new Element(METHOD, signature, children, add, provider.get() && !m.isPublic() ? MINOR : remove, null);
MethodDef mdef = null; if (cd != null) { mdef = new MethodDef(access_flags, name, descriptor); last = mdef; cd.method(mdef);
String descriptor = pool[descriptor_index].toString(); if (cd != null) { MethodDef mdef = new MethodDef(access_flags, name, descriptor); last = mdef; cd.method(mdef);
MethodDef mdef = null; if (cd != null) { mdef = new MethodDef(access_flags, name, descriptor); last = mdef; cd.method(mdef);
String descriptor = pool[descriptor_index].toString(); if (cd != null) { MethodDef mdef = new MethodDef(access_flags, name, descriptor); last = mdef; cd.method(mdef);
String descriptor = pool[descriptor_index].toString(); if (cd != null) { MethodDef mdef = new MethodDef(access_flags, name, descriptor); last = mdef; cd.method(mdef);
service = Patterns.inferTypeFromGenericType(m_methodDef.getDescriptor().toString(), m_methodDef.getSignature(), m_logger);
if (defined.isConstructor()) { analyzer.error("Constructor %s for %s.%s found; only interfaces and annotations allowed for OCDs", defined.getName(), clazz.getClassName() .getFQN(), defined.getName()); if (defined.getPrototype().length > 0) { analyzer.error( "Element %s for %s.%s has parameters; only no-parameter elements in an OCD interface allowed", defined.getName(), clazz.getClassName() .getFQN(), defined.getName()); continue; String key = defined.getName(); if ((singleElementAnnotation != null) && key.equals("value")) { key = singleElementAnnotation; ad.name = space(defined.getName()); String rtype = defined.getGenericReturnType(); if (rtype.startsWith("[")) { ad.cardinality = Integer.MAX_VALUE; clazz.getClassName() .getFQN(), defined.getName(), defined.getType() .getFQN()); rtype = m.group(4);
if (defined.isConstructor()) { analyzer.error("Constructor %s for %s.%s found; only interfaces and annotations allowed for OCDs", defined.getName(), clazz.getClassName() .getFQN(), defined.getName()); if (defined.getPrototype().length > 0) { analyzer.error( "Element %s for %s.%s has parameters; only no-parameter elements in an OCD interface allowed", defined.getName(), clazz.getClassName() .getFQN(), defined.getName()); continue; String key = defined.getName(); if ((singleElementAnnotation != null) && key.equals("value")) { key = singleElementAnnotation; ad.name = space(defined.getName()); String rtype = defined.getGenericReturnType(); if (rtype.startsWith("[")) { ad.cardinality = Integer.MAX_VALUE; clazz.getClassName() .getFQN(), defined.getName(), defined.getType() .getFQN()); rtype = m.group(4);
private void addMethod(MethodDef method, Annotation a) throws Exception { if (method.isStatic()) return; String rtype = method.getGenericReturnType(); String id = mangleMethodName(method.getName()); String name = Clazz.unCamel(id); clazz.getClassName() .getFQN(), method.getName(), method.getType() .getFQN()); Matcher m = COLLECTION.matcher(rtype);
private void addMethod(MethodDef method, Meta.AD ad) throws Exception { if ( method.isStatic()) return; String rtype = method.getGenericReturnType(); String id = Configurable.mangleMethodName(method.getName()); String name = Clazz.unCamel(id); reporter.error( "AD for %s.%s uses an array of collections in return type (%s), Metatype allows either Vector or array", clazz.getClassName().getFQN(), method.getName(), method.getType().getFQN()); Matcher m = COLLECTION.matcher(rtype); if (m.matches()) {
private void addMethod(MethodDef method, Meta.AD ad) throws Exception { if ( method.isStatic()) return; String rtype = method.getGenericReturnType(); String id = Configurable.mangleMethodName(method.getName()); String name = Clazz.unCamel(id); reporter.error( "AD for %s.%s uses an array of collections in return type (%s), Metatype allows either Vector or array", clazz.getClassName().getFQN(), method.getName(), method.getType().getFQN()); Matcher m = COLLECTION.matcher(rtype); if (m.matches()) {
String rtype = method.getGenericReturnType(); String id = Configurable.mangleMethodName(method.getName()); String name = Clazz.unCamel(id); reporter.error( "AD for %s.%s uses an array of collections in return type (%s), Metatype allows either Vector or array", clazz.getClassName().getFQN(), method.getName(), method.getType().getFQN()); Matcher m = COLLECTION.matcher(rtype); if (m.matches()) {