/** * Returns the declared type of the injection point, e.g. an * injected field's type. */ @Override public Type getType() { if (_type != null) return _type; else return _annotated.getBaseType(); }
/** * Gets the base type from the delegate * * @return the base type */ public Type getBaseType() { return delegate.getBaseType(); }
private void addAnnotatedTypeIfNecessary(Annotated annotated) { if (annotated.isAnnotationPresent(Param.class)) { Type type = annotated.getBaseType(); // Skip ParamValue as it is already handled by RequestParameterProducer. if (type instanceof ParameterizedType && ParamValue.class.isAssignableFrom((Class<?>) ((ParameterizedType) type).getRawType())) { return; } types.add(type); } }
private void addAnnotatedTypeIfNecessary(Annotated annotated) { if (annotated.isAnnotationPresent(Param.class)) { Type type = annotated.getBaseType(); // Skip ParamValue as it is already handled by RequestParameterProducer. if (type instanceof ParameterizedType && ParamValue.class.isAssignableFrom((Class<?>) ((ParameterizedType) type).getRawType())) { return; } types.add(type); } }
<T> void findEndpointsAndApplication(@Observes final ProcessBean<T> event) { final String typeName = event.getAnnotated().getBaseType().getTypeName(); if (classes == null && !skipScan && event.getAnnotated().isAnnotationPresent(Path.class) && !typeName.startsWith("org.apache.geronimo.microprofile.openapi.") && (packages == null || packages.stream().anyMatch(typeName::startsWith))) { endpoints.add(event.getBean()); } }
private void validateStatefulSessionBean(Annotated type) { assert type.getBaseType().equals(Cow.class); assert rawTypeSetMatches(type.getTypeClosure(), Cow.class, CowLocal.class, Object.class); assert type.getAnnotations().size() == 0; }
private void validateStatefulSessionBean(Annotated type) { assert type.getBaseType().equals(Cow.class); assert typeSetMatches(type.getTypeClosure(), Cow.class, CowLocal.class, Object.class); assert type.getAnnotations().size() == 0; }
protected static BaseType createBaseType(Annotated ann) { if (ann instanceof BaseTypeAnnotated) return ((BaseTypeAnnotated) ann).getBaseTypeImpl(); else return createBaseType(ann.getBaseType()); }
public static <T> Optional<T> optionalConfigValue(InjectionPoint injectionPoint, Config config) { Type type = injectionPoint.getAnnotated().getBaseType(); final Class<T> valueType; valueType = resolveValueType(type); return Optional.ofNullable(getValue(injectionPoint, valueType, config)); }
private void validateStatelessSessionBean(Annotated type) { assert type.getBaseType().equals(Sheep.class); assert rawTypeSetMatches(type.getTypeClosure(), Sheep.class, SheepLocal.class, Object.class); assert type.getAnnotations().size() == 2; assert annotationSetMatches(type.getAnnotations(), Tame.class, Stateless.class); // TODO // Check }
public static BaseType getBaseType(Annotated annotated) { if (annotated instanceof BaseTypeAnnotated) return ((BaseTypeAnnotated) annotated).getBaseTypeImpl(); else return InjectManager.create().createTargetBaseType(annotated.getBaseType()); }
private void addAnnotatedTypeIfNecessary(Annotated annotated) { if (annotated.isAnnotationPresent(ManagedProperty.class)) { Type type = annotated.getBaseType(); types.add(new ManagedPropertyInfo(type, annotated.getAnnotation(ManagedProperty.class).value())); } }
private void validateStatelessSessionBean(Annotated type) { assert type.getBaseType().equals(Sheep.class); assert typeSetMatches(type.getTypeClosure(), Sheep.class, SheepLocal.class, Object.class); assert type.getAnnotations().size() == 2; assert annotationSetMatches(type.getAnnotations(), Tame.class, Stateless.class); }
public static <C extends Collection<T>, T> C collectionConfigProperty(InjectionPoint injectionPoint, Config config, C collection) { Type type = injectionPoint.getAnnotated().getBaseType(); final Class<T> valueType = resolveValueType(type); String stringValue = getValue(injectionPoint, String.class, config); String[] split = StringUtil.split(stringValue); for (String aSplit : split) { T item = ((SmallRyeConfig) config).convert(aSplit, valueType); collection.add(item); } return collection; }
public static void validateAnnotated(Annotated annotated) { checkNotNull(annotated.getAnnotations(), "getAnnotations()", annotated); checkNotNull(annotated.getBaseType(), "getBaseType()", annotated); checkNotNull(annotated.getTypeClosure(), "getTypeClosure()", annotated); }
public static void validateAnnotated(Annotated annotated) { checkNotNull(annotated.getAnnotations(), "getAnnotations()", annotated); checkNotNull(annotated.getBaseType(), "getBaseType()", annotated); checkNotNull(annotated.getTypeClosure(), "getTypeClosure()", annotated); }
public static void validateAnnotated(Annotated annotated) { checkNotNull(annotated.getAnnotations(), "getAnnotations()", annotated); checkNotNull(annotated.getBaseType(), "getBaseType()", annotated); checkNotNull(annotated.getTypeClosure(), "getTypeClosure()", annotated); }
public static void validateAnnotated(Annotated annotated) { checkNotNull(annotated.getAnnotations(), "getAnnotations()", annotated); checkNotNull(annotated.getBaseType(), "getBaseType()", annotated); checkNotNull(annotated.getTypeClosure(), "getTypeClosure()", annotated); }
public static void validateAnnotated(Annotated annotated) { checkNotNull(annotated.getAnnotations(), "getAnnotations()", annotated); checkNotNull(annotated.getBaseType(), "getBaseType()", annotated); checkNotNull(annotated.getTypeClosure(), "getTypeClosure()", annotated); }
public static void validateAnnotated(Annotated annotated) { checkNotNull(annotated.getAnnotations(), "getAnnotations()", annotated); checkNotNull(annotated.getBaseType(), "getBaseType()", annotated); checkNotNull(annotated.getTypeClosure(), "getTypeClosure()", annotated); }