@Override public boolean isAnnotationPresent(final Class<? extends Annotation> annotation) { return annotated.isAnnotationPresent(annotation); }
@Override public boolean isAnnotationPresent(final Class<? extends Annotation> annotation) { return getAnnotated().isAnnotationPresent(annotation); }
private WiringElementType[] getWiringTypeForProducer(final MetaClass enclosingClass, final HasAnnotations annotated, final Class<? extends Annotation> directScope) { final List<WiringElementType> wiringTypes = new ArrayList<>(); wiringTypes.addAll(getWiringTypesForScopeAnnotation(directScope)); if (annotated.isAnnotationPresent(Specializes.class)) { wiringTypes.add(WiringElementType.Specialization); } if (enclosingClass.isAnnotationPresent(LoadAsync.class)) { wiringTypes.add(WiringElementType.LoadAsync); } return wiringTypes.toArray(new WiringElementType[wiringTypes.size()]); }
private Predicate<List<InjectableHandle>> getPathPredicate(final HasAnnotations annotated, final List<String> problems) { if (annotated.isAnnotationPresent(Typed.class)) { final Class<?>[] beanTypes = annotated.getAnnotation(Typed.class).value(); validateAssignableTypes(annotated, beanTypes, problems); return path -> Object.class.getName().equals(path.get(0)) || Arrays.stream(beanTypes) .anyMatch(beanType -> path.get(0).getType().getFullyQualifiedName().equals(beanType.getName())); } else { return ANY; } }
if (componentType.isAssignableTo(Widget.class)) { if (!decorable.get().isAnnotationPresent(Inject.class) && decorable.decorableType().equals(DecorableType.FIELD) && componentType.isDefaultInstantiable()) { Statement widgetInit = Stmt.loadVariable("this").invoke( PrivateAccessUtil.getPrivateFieldAccessorName(decorable.getAsField()),
if (componentType.isAssignableTo(Widget.class)) { if (!decorable.get().isAnnotationPresent(Inject.class) && decorable.decorableType().equals(DecorableType.FIELD) && componentType.isDefaultInstantiable()) { Statement widgetInit = Stmt.loadVariable("this").invoke( PrivateAccessUtil.getPrivateFieldAccessorName(decorable.getAsField()),