Tabnine Logo
AnnotatedTypeBuilder.addToField
Code IndexAdd Tabnine to your IDE (free)

How to use
addToField
method
in
org.jboss.seam.solder.reflection.annotated.AnnotatedTypeBuilder

Best Java code snippets using org.jboss.seam.solder.reflection.annotated.AnnotatedTypeBuilder.addToField (Showing top 5 results out of 315)

origin: org.jboss.seam.solder/seam-solder

/**
* Add an annotation to the specified field. If the field is not already
* present, it will be added.
* 
* @param field the field to add the annotation to
* @param annotation the annotation to add
* @throws IllegalArgumentException if the annotation is null
*/
public AnnotatedTypeBuilder<X> addToField(AnnotatedField<? super X> field, Annotation annotation)
{
 return addToField(field.getJavaMember(), annotation);
}
origin: org.jboss.seam.config/seam-config-xml

public void addToField(Field field, Annotation annotation)
{
 if (annotation.annotationType().isAnnotationPresent(Scope.class) || annotation.annotationType().isAnnotationPresent(NormalScope.class))
 {
   for (Annotation typeAnnotation : field.getAnnotations())
   {
    if (typeAnnotation.annotationType().isAnnotationPresent(Scope.class) || typeAnnotation.annotationType().isAnnotationPresent(NormalScope.class))
    {
      builder.removeFromField(field, typeAnnotation.annotationType());
    }
   }
 }
 builder.addToField(field, annotation);
}
origin: org.jboss.seam.international/seam-international-impl

  <X> void detectBundleInjectionTargets(@Observes ProcessInjectionTarget<X> event, BeanManager beanManager) {
    AnnotatedType<X> type = event.getAnnotatedType();
    for (AnnotatedField<?> f : type.getFields()) {
      Field field = f.getJavaMember();
      Class<?> clz = field.getType();
      if (clz.isAnnotationPresent(MessageBundle.class)) {
        log.info("Add @MessageBundle to " + type.getJavaClass().getName() + "." + field.getName()
            + " injection point for the type: " + clz.getName());
        AnnotatedTypeBuilder<X> typeBuilder = new AnnotatedTypeBuilder<X>().readFromType(type);
        typeBuilder.addToField(field, MessageBundleLiteral.INSTANCE);
        event.setInjectionTarget(beanManager.createInjectionTarget(typeBuilder.create()));
      }
    }
  }
}
origin: org.jboss.seam.solder/seam-solder

builder.addToField(f, syntheticQualifier);
producerToDeclaringDefaultBean.put(syntheticQualifier, new DefaultBeanQualifiers(declaringBeanSyntheticQualifier, declaringBeanQualifiers));
origin: org.jboss.seam.solder/seam-solder

builder.addToField(f, new NamedLiteral(qualify(targetPackage, name)));
org.jboss.seam.solder.reflection.annotatedAnnotatedTypeBuilderaddToField

Javadoc

Add an annotation to the specified field. If the field is not already present, it will be added.

Popular methods of AnnotatedTypeBuilder

  • <init>
    Create a new builder. A new builder has no annotations and no members.
  • create
    Create an AnnotatedType. Any public members present on the underlying class and not overridden by th
  • readFromType
    Reads in from an existing AnnotatedType. Any elements not present are added. The javaClass will be r
  • addToClass
    Add an annotation to the type declaration.
  • overrideFieldType
    Override the declared type of a field
  • removeFromClass
    Remove an annotation from the type
  • addToConstructor
    Add an annotation to the specified constructor. If the constructor is not already present, it will b
  • addToConstructorParameter
    Add an annotation to the specified constructor parameter. If the constructor is not already present,
  • addToMethod
    Add an annotation to the specified method. If the method is not already present, it will be added.
  • addToMethodParameter
    Add an annotation to the specified method parameter. If the method is not already present, it will b
  • removeFromField
    Remove an annotation from the specified field.
  • removeFromMethod
    Remove an annotation from the specified method.
  • removeFromField,
  • removeFromMethod,
  • getJavaClass,
  • mergeAnnotationsOnElement,
  • overrideConstructorParameterType,
  • overrideMethodParameterType,
  • overrideParameterType,
  • redefine,
  • redefineAnnotationBuilder

Popular in Java

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now