- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {StringBuilder s =
new StringBuilder()
new StringBuilder(32)
String str;new StringBuilder(str)
- Smart code suggestions by Codota
}
public void addToClass(Annotation annotation) { // TODO: this should be done with the BeanManager one WELD-721 is resolved if (annotation.annotationType().isAnnotationPresent(Scope.class) || annotation.annotationType().isAnnotationPresent(NormalScope.class)) { // if the user is adding a new scope we need to remove any existing // ones for (Annotation typeAnnotation : type.getAnnotations()) { if (typeAnnotation.annotationType().isAnnotationPresent(Scope.class) || typeAnnotation.annotationType().isAnnotationPresent(NormalScope.class)) { builder.removeFromClass(typeAnnotation.annotationType()); } } } builder.addToClass(annotation); }
removeFromClass(annotationType); for (Entry<Field, AnnotationBuilder> field : fields.entrySet())
public BeanResult(Class<X> type, boolean readAnnotations, BeanResultType beanType, List<FieldValueObject> fieldValues, List<BeanResult<?>> inlineBeans, BeanManager beanManager) { this.beanManager = beanManager; this.type = type; builder = new AnnotatedTypeBuilder<X>().setJavaClass(type); builder.addToClass(XmlConfiguredBeanLiteral.INSTANCE); if (readAnnotations) { builder.readFromType(type); // we don't want to keep the veto annotation on the class builder.removeFromClass(Veto.class); } this.beanType = beanType; this.fieldValues = new ArrayList<FieldValueObject>(fieldValues); this.inlineBeans = new ArrayList<BeanResult<?>>(inlineBeans); }
private AnnotatedType<Object> decorateType(final AnnotatedType<Object> type, final Class<? extends Annotation> jsfScope) { final Class<? extends Annotation> cdiScope = getCdiScopeFor(jsfScope); AnnotationInstanceProvider provider = new AnnotationInstanceProvider(); final Annotation cdiScopeAnnotation = provider.get(cdiScope, Collections.EMPTY_MAP); AnnotatedTypeBuilder builder; builder = new AnnotatedTypeBuilder() .readFromType(type) .removeFromClass(jsfScope) .addToClass(cdiScopeAnnotation); return builder.create(); } }
builder.removeFromClass(a.annotationType());
builder.removeFromClass(Named.class); // add w/o remove was failing in cases builder.addToClass(new NamedLiteral(qualify(targetPackage, name)));