Codota Logo
AnnotatedTypeBuilder.readFromType
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: org.jboss.seam.solder/seam-solder

/**
* Reads in from an existing AnnotatedType. Any elements not present are
* added. The javaClass will be read in. If the annotation already exists on
* that element in the builder the read annotation will be used.
* 
* @param type the type to read from
* @throws IllegalArgumentException if type is null
*/
public AnnotatedTypeBuilder<X> readFromType(AnnotatedType<X> type)
{
 return readFromType(type, true);
}
origin: org.jboss.seam.solder/seam-solder

/**
* Reads the annotations from an existing java type. Annotations already
* present will be overwritten
* 
* @param type the type to read from
* @throws IllegalArgumentException if type is null
*/
public AnnotatedTypeBuilder<X> readFromType(Class<X> type)
{
 return readFromType(type, true);
}
origin: org.jboss.seam.solder/seam-solder

private <X> AnnotatedTypeBuilder<X> initializeBuilder(final AnnotatedTypeBuilder<X> currentBuilder, final AnnotatedType<X> source)
{
 if (currentBuilder == null)
 {
   return new AnnotatedTypeBuilder<X>().readFromType(source);
 }
 return currentBuilder;
}
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.config/seam-config-xml

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);
}
origin: org.jboss.seam.solder/seam-solder

/**
* Creates a wrapper around an AutoProxy handler class
* 
* @param handlerClass The handler class
* @throws IllegalArgumentException if the handler class is does not have a
*            suitable @AroundInvoke method
*/
ServiceHandlerManager(Class<T> handlerClass, BeanManager beanManager) throws IllegalArgumentException
{
 this.handlerClass = handlerClass;
 handlerMethod = getHandlerMethod(handlerClass);
 //now create the InjectionTarget
 AnnotatedTypeBuilder<T> typeBuilder = new AnnotatedTypeBuilder<T>().readFromType(handlerClass);
 injectionTarget = beanManager.createInjectionTarget(typeBuilder.create());
}
origin: org.jboss.seam.faces/seam-faces-impl

public <T> void processAnnotatedType(@Observes final ProcessAnnotatedType<T> event) {
  AnnotatedTypeBuilder<T> builder = new AnnotatedTypeBuilder<T>();
  builder.readFromType(event.getAnnotatedType());
  boolean modifiedType = false;
  for (AnnotatedField<?> f : event.getAnnotatedType().getFields()) {
    if (f.isAnnotationPresent(InputField.class)) {
      builder.overrideFieldType(f.getJavaMember(), Object.class);
      modifiedType = true;
    }
  }
  if (modifiedType) {
    AnnotatedType<T> replacement = builder.create();
    typeOverrides.put(replacement.getJavaClass(), replacement);
    event.setAnnotatedType(replacement);
  }
}
origin: org.jboss.seam.solder/seam-solder

final AnnotatedTypeBuilder<X> builder = new AnnotatedTypeBuilder<X>().readFromType(type);
builder.addToClass(genericBeanQualifier);
builder.redefine(Inject.class, new AnnotationRedefiner<Inject>()
origin: org.jboss.seam.faces/seam-faces-impl

  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();
  }
}
origin: org.jboss.seam.solder/seam-solder

builder = new AnnotatedTypeBuilder<X>().readFromType(tp);
for (Annotation a : tp.getAnnotations())
   builder = new AnnotatedTypeBuilder<X>().readFromType(tp);
   builder = new AnnotatedTypeBuilder<X>().readFromType(tp);
org.jboss.seam.solder.reflection.annotatedAnnotatedTypeBuilderreadFromType

Javadoc

Reads the annotations from an existing java type. Annotations already present will be overwritten

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
  • addToClass
    Add an annotation to the type declaration.
  • addToField
    Add an annotation to the specified field. If the field is not already present, it will be added.
  • 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

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • startActivity (Activity)
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now