@Override public Set<Class> getMarkers() { return sd.getMarkers(); }
@Override public Set<Class> getMarkers() { return serviceDef.getMarkers(); }
@Override public Set<Class> getMarkers() { return sd.getMarkers(); }
@Override public Set<Class> getMarkers() { return serviceDef.getMarkers(); }
private boolean markerMatched(ServiceDef serviceDef, Markable markable) { final Class markableInterface = markable.getServiceInterface(); if (markableInterface == null || !markableInterface.isAssignableFrom(serviceDef.getServiceInterface())) return false; Set<Class> contributionMarkers = CollectionFactory.newSet(markable.getMarkers()); if (contributionMarkers.contains(Local.class)) { // If @Local is present, filter out services that aren't in the same module. // Don't consider @Local to be a marker annotation // for the later match, however. if (!isLocalServiceDef(serviceDef)) return false; contributionMarkers.remove(Local.class); } // Filter out any stray annotations that aren't used by some // service, in any module, as a marker annotation. contributionMarkers.retainAll(registry.getMarkerAnnotations()); //@Advise and @Decorate default to Object.class service interface. //If @Match is present, no marker annotations are needed. //In such a case an empty contribution marker list should be ignored. if (markableInterface == Object.class && contributionMarkers.isEmpty()) return false; return serviceDef.getMarkers().containsAll(contributionMarkers); }
private boolean markerMatched(ServiceDef serviceDef, Markable markable) { final Class markableInterface = markable.getServiceInterface(); if (markableInterface == null || !markableInterface.isAssignableFrom(serviceDef.getServiceInterface())) return false; Set<Class> contributionMarkers = CollectionFactory.newSet(markable.getMarkers()); if (contributionMarkers.contains(Local.class)) { // If @Local is present, filter out services that aren't in the same module. // Don't consider @Local to be a marker annotation // for the later match, however. if (!isLocalServiceDef(serviceDef)) return false; contributionMarkers.remove(Local.class); } // Filter out any stray annotations that aren't used by some // service, in any module, as a marker annotation. contributionMarkers.retainAll(registry.getMarkerAnnotations()); //@Advise and @Decorate default to Object.class service interface. //If @Match is present, no marker annotations are needed. //In such a case an empty contribution marker list should be ignored. if (markableInterface == Object.class && contributionMarkers.isEmpty()) return false; return serviceDef.getMarkers().containsAll(contributionMarkers); }
assertEquals(sd.getServiceScope(), ScopeConstants.DEFAULT); assertSame(sd.createServiceCreator(null).createObject(), fred); assertTrue(sd.getMarkers().isEmpty()); assertFalse(sd.isEagerLoad()); assertEquals(sd.createServiceCreator(null).toString(), "ObjectCreator<Spring Bean 'fred'>");