Package org.jboss.jandex

Examples of org.jboss.jandex.AnnotationTarget


    }

    // iterate over all @Access annotations defined on the current class
    for ( AnnotationInstance accessAnnotation : accessAnnotations ) {
      // we are only interested at annotations defined on fields and methods
      AnnotationTarget annotationTarget = accessAnnotation.target();
      if ( !( annotationTarget.getClass().equals( MethodInfo.class ) || annotationTarget.getClass()
          .equals( FieldInfo.class ) ) ) {
        continue;
      }

      AccessType accessType = JandexHelper.getEnumValue( accessAnnotation, "value", AccessType.class );
View Full Code Here


    if ( transientMembers == null ) {
      return;
    }

    for ( AnnotationInstance transientMember : transientMembers ) {
      AnnotationTarget target = transientMember.target();
      if ( target instanceof FieldInfo ) {
        transientFieldNames.add( ( (FieldInfo) target ).name() );
      }
      else {
        transientMethodNames.add( ( (MethodInfo) target ).name() );
View Full Code Here

  }

  private static JaxbAccessType processIdAnnotations(List<AnnotationInstance> idAnnotations) {
    JaxbAccessType accessType = null;
    for ( AnnotationInstance annotation : idAnnotations ) {
      AnnotationTarget tmpTarget = annotation.target();
      if ( tmpTarget == null ) {
        throw new AssertionFailure( "@Id has no AnnotationTarget, this is mostly a internal error." );
      }
      if ( accessType == null ) {
        accessType = annotationTargetToAccessType( tmpTarget );
View Full Code Here

    Map<DotName, List<AnnotationInstance>> indexedAnnotations = indexBuilder.getIndexedAnnotations( className );
    if ( indexedAnnotations != null && indexedAnnotations.containsKey( ACCESS ) ) {
      List<AnnotationInstance> annotationInstances = indexedAnnotations.get( ACCESS );
      if ( MockHelper.isNotEmpty( annotationInstances ) ) {
        for ( AnnotationInstance annotationInstance : annotationInstances ) {
          AnnotationTarget indexedPropertyTarget = annotationInstance.target();
          if ( indexedPropertyTarget == null ) {
            continue;
          }
          if ( JandexHelper.getPropertyName( indexedPropertyTarget ).equals( attributeName ) ) {
            JaxbAccessType accessType = JandexHelper.getEnumValue(
View Full Code Here

      return;
    }
    List<AnnotationInstance> annotationInstanceList = annotatedMap.get( annName );
    if ( MockHelper.isNotEmpty( annotationInstanceList ) ) {
      for ( AnnotationInstance annotationInstance : annotationInstanceList ) {
        AnnotationTarget annotationTarget = annotationInstance.target();
        if ( MockHelper.targetEquals( target, annotationTarget ) ) {
          if ( operation.process( annotationInstance ) ) {
            return;
          }
        }
View Full Code Here

* @author Strong Liu
*/
class NameTargetAnnotationFilter extends AbstractAnnotationFilter {
  @Override
  protected void process(DotName annName, AnnotationInstance annotationInstance, List<AnnotationInstance> indexedAnnotationInstanceList) {
    AnnotationTarget target = annotationInstance.target();

    for ( Iterator<AnnotationInstance> iter = indexedAnnotationInstanceList.iterator(); iter.hasNext(); ) {
      AnnotationInstance ann = iter.next();
      if ( MockHelper.targetEquals( target, ann.target() ) ) {
        iter.remove();
View Full Code Here

  protected void overrideIndexedAnnotationMap(DotName annName, AnnotationInstance annotationInstance, Map<DotName, List<AnnotationInstance>> map) {
    ExclusiveGroup group = getExclusiveGroup( annName );
    if ( group == null ) {
      return;
    }
    AnnotationTarget target = annotationInstance.target();
    for ( DotName entityAnnName : group ) {
      if ( !map.containsKey( entityAnnName ) ) {
        continue;
      }
      switch ( group.scope ) {
View Full Code Here

        Set<String> persistenceTypeNames = new HashSet<String>();

        for (Map.Entry<URL, Index> entry : pu.getAnnotationIndex().entrySet()) {
            List<AnnotationInstance> instances = entry.getValue().getAnnotations(DotName.createSimple(Entity.class.getName()));
            for (AnnotationInstance instance : instances) {
                AnnotationTarget target = instance.target();
                if (target instanceof ClassInfo) {
                    ClassInfo classInfo = (ClassInfo) target;
                    persistenceTypeNames.add(classInfo.name().toString());
                }
            }
View Full Code Here

         backingRepository.getAnnotations(DotName.createSimple(annotationClass.getName()));

      ArrayList<Annotation> annotations = new ArrayList<Annotation>(instances.size());
      for (AnnotationInstance instance : instances)
      {
         AnnotationTarget target = instance.target();
         Annotation annotation = null;
         if (target instanceof MethodInfo)
         {
            MethodInfo m = (MethodInfo) target;
            List<String> parameterTypes = new ArrayList<String>(m.args().length);
View Full Code Here

    public Collection<Annotation> getAnnotation(Class<?> annotationClass) {
        List<AnnotationInstance> instances = backingRepository.getAnnotations(DotName.createSimple(annotationClass
                .getName()));
        ArrayList<Annotation> annotations = new ArrayList<Annotation>(instances.size());
        for (AnnotationInstance instance : instances) {
            AnnotationTarget target = instance.target();
            Annotation annotation = null;
            if (target instanceof MethodInfo) {
                MethodInfo m = (MethodInfo) target;
                List<String> parameterTypes = new ArrayList<String>(m.args().length);
                for (Type type : m.args()) {
View Full Code Here

TOP

Related Classes of org.jboss.jandex.AnnotationTarget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.