@Override public void implementsInterfaces(TypeRef names[]) throws Exception { Arrays.sort(names); // ignore type reordering for (TypeRef name : names) { String comment = null; if (clazz.isInterface() || clazz.isAbstract()) comment = inherit(members, name); members.add(new Element(IMPLEMENTS, name.getFQN(), null, MINOR, MAJOR, comment)); } }
@Override public void implementsInterfaces(TypeRef names[]) throws Exception { Arrays.sort(names); // ignore type reordering for (TypeRef name : names) { String comment = null; if (clazz.isInterface() || clazz.isAbstract()) comment = inherit(members, name); members.add(new Element(IMPLEMENTS, name.getFQN(), null, MINOR, MAJOR, comment)); } }
@Override public void implementsInterfaces(TypeRef names[]) throws Exception { // TODO is interface reordering important for binary // compatibility?? for (TypeRef name : names) { String comment = null; if (clazz.isInterface() || clazz.isAbstract()) comment = inherit(members, name); members.add(new Element(Type.IMPLEMENTS, name.getFQN(), null, MINOR, MAJOR, comment)); } }
@Override public void implementsInterfaces(TypeRef names[]) throws Exception { // TODO is interface reordering important for binary // compatibility?? for (TypeRef name : names) { String comment = null; if (clazz.isInterface() || clazz.isAbstract()) comment = inherit(members, name); members.add(new Element(Type.IMPLEMENTS, name.getFQN(), null, MINOR, MAJOR, comment)); } }
@Override public void implementsInterfaces(TypeRef names[]) throws Exception { // TODO is interface reordering important for binary // compatibility?? for (TypeRef name : names) { String comment = null; if (clazz.isInterface() || clazz.isAbstract()) comment = inherit(members, name); members.add(new Element(Type.IMPLEMENTS, name.getFQN(), null, MINOR, MAJOR, comment)); } }
return !isAbstract(); return isAbstract();
return !isAbstract(); return isAbstract();
private boolean identifiableCollection(TypeRef type, boolean intface, boolean topLevel) { try { Clazz clazz = analyzer.findClass(type); if (clazz != null && (!topLevel || !clazz.isAbstract()) && ((intface && clazz.isInterface()) ^ clazz.hasPublicNoArgsConstructor())) { TypeRef[] intfs = clazz.getInterfaces(); if (intfs != null) { for (TypeRef intf : intfs) { if (COLLECTION.matcher(intf.getFQN()) .matches() || identifiableCollection(intf, true, false)) { return true; } } } TypeRef ext = clazz.getSuper(); return ext != null && identifiableCollection(ext, false, false); } } catch (Exception e) { return false; } return false; }
private boolean identifiableCollection(TypeRef type, boolean intface, boolean topLevel) { try { Clazz clazz = analyzer.findClass(type); if (clazz != null && (!topLevel || !clazz.isAbstract()) && ((intface && clazz.isInterface()) ^ clazz.hasPublicNoArgsConstructor())) { TypeRef[] intfs = clazz.getInterfaces(); if (intfs != null) { for (TypeRef intf : intfs) { if (COLLECTION.matcher(intf.getFQN()) .matches() || identifiableCollection(intf, true, false)) { return true; } } } TypeRef ext = clazz.getSuper(); return ext != null && identifiableCollection(ext, false, false); } } catch (Exception e) { return false; } return false; }
private boolean acceptableType(String rtype) { TypeRef ref = analyzer.getTypeRef(rtype); try { Clazz returnType = analyzer.findClass(ref); if (returnType.isEnum()) { return true; } // TODO check this is true for interfaces and annotations if (!returnType.isAbstract() || (returnType.isInterface() && options.contains(Options.nested))) { return true; } if (!returnType.isInterface()) { analyzer.error("Abstract classes not allowed as interface method return values: %s", rtype); } else { analyzer.error("Nested metatype only allowed with option: nested type %s", rtype); } return false; } catch (Exception e) { analyzer.exception(e, "could not examine class for return type %s, exception message: %s", rtype, e); return false; } }
private boolean acceptableType(String rtype) { TypeRef ref = analyzer.getTypeRef(rtype); try { Clazz returnType = analyzer.findClass(ref); if (returnType.isEnum()) { return true; } // TODO check this is true for interfaces and annotations if (!returnType.isAbstract() || (returnType.isInterface() && options.contains(Options.nested))) { return true; } if (!returnType.isInterface()) { analyzer.error("Abstract classes not allowed as interface method return values: %s", rtype); } else { analyzer.error("Nested metatype only allowed with option: nested type %s", rtype); } return false; } catch (Exception e) { analyzer.exception(e, "could not examine class for return type %s, exception message: %s", rtype, e); return false; } }
bactivator, ActivatorErrorType.IS_INTERFACE); } else { if (activatorClazz.isAbstract()) { registerActivatorErrorLocation( error("The Bundle Activator %s is abstract and therefore cannot be instantiated.",
bactivator, ActivatorErrorType.IS_INTERFACE); } else { if (activatorClazz.isAbstract()) { registerActivatorErrorLocation( error("The Bundle Activator %s is abstract and therefore cannot be instantiated.",
bactivator, ActivatorErrorType.IS_INTERFACE); } else { if(activatorClazz.isAbstract()) { registerActivatorErrorLocation(error("The Bundle Activator " + bactivator + " is abstract and therefore cannot be instantiated."),
bactivator, ActivatorErrorType.IS_INTERFACE); } else { if(activatorClazz.isAbstract()) { registerActivatorErrorLocation(error("The Bundle Activator " + bactivator + " is abstract and therefore cannot be instantiated."),