Examples of AnnotationInstance


Examples of org.jboss.jandex.AnnotationInstance

  private AnnotationInstance parserNamedNativeQueries(Collection<JaxbNamedNativeQuery> namedQueries) {
    AnnotationValue[] values = new AnnotationValue[namedQueries.size()];
    int i = 0;
    for ( Iterator<JaxbNamedNativeQuery> iterator = namedQueries.iterator(); iterator.hasNext(); ) {
      AnnotationInstance annotationInstance = parserNamedNativeQuery( iterator.next() );
      values[i++] = MockHelper.nestedAnnotationValue(
          "", annotationInstance
      );
    }
    return create(
View Full Code Here

Examples of org.jboss.jandex.AnnotationInstance

  private AnnotationInstance parserNamedQueries(Collection<JaxbNamedQuery> namedQueries) {
    AnnotationValue[] values = new AnnotationValue[namedQueries.size()];
    int i = 0;
    for ( Iterator<JaxbNamedQuery> iterator = namedQueries.iterator(); iterator.hasNext(); ) {
      AnnotationInstance annotationInstance = parserNamedQuery( iterator.next() );
      values[i++] = MockHelper.nestedAnnotationValue(
          "", annotationInstance
      );
    }
    return create(
View Full Code Here

Examples of org.jboss.jandex.AnnotationInstance

  private void nestedQueryHintList(String name, List<JaxbQueryHint> constraints, List<AnnotationValue> annotationValueList) {
    if ( MockHelper.isNotEmpty( constraints ) ) {
      AnnotationValue[] values = new AnnotationValue[constraints.size()];
      for ( int i = 0; i < constraints.size(); i++ ) {
        AnnotationInstance annotationInstance = parserQueryHint( constraints.get( i ) );
        values[i] = MockHelper.nestedAnnotationValue(
            "", annotationInstance
        );
      }
      MockHelper.addToCollectionIfNotNull(
View Full Code Here

Examples of org.jboss.jandex.AnnotationInstance

  protected AnnotationValue[] nestedSecondaryTableList(String name, List<JaxbSecondaryTable> secondaryTableList, List<AnnotationValue> annotationValueList) {
    if ( MockHelper.isNotEmpty( secondaryTableList ) ) {
      AnnotationValue[] values = new AnnotationValue[secondaryTableList.size()];
      for ( int i = 0; i < secondaryTableList.size(); i++ ) {
        AnnotationInstance annotationInstance = parserSecondaryTable( secondaryTableList.get( i ), null );
        values[i] = MockHelper.nestedAnnotationValue(
            "", annotationInstance
        );
      }
      MockHelper.addToCollectionIfNotNull(
View Full Code Here

Examples of org.jboss.jandex.AnnotationInstance

  private void mockTableIfNonExist(Map<DotName, List<AnnotationInstance>> annotationsMap, DotName annName) {
    if ( annName == JPADotNames.TABLE && !annotationsMap.containsKey( JPADotNames.TABLE ) && annotationsMap
        .containsKey( JPADotNames.ENTITY ) ) {
      //if an entity doesn't have a @Table, we create one here
      AnnotationInstance entity = JandexHelper.getSingleAnnotation( annotationsMap, JPADotNames.ENTITY );
      AnnotationInstance table = MockHelper.create(
          JPADotNames.TABLE, entity.target(), MockHelper.EMPTY_ANNOTATION_VALUE_ARRAY
      );
      List<AnnotationInstance> annotationInstanceList = new ArrayList<AnnotationInstance>( 1 );
      annotationInstanceList.add( table );
      annotationsMap.put( JPADotNames.TABLE, annotationInstanceList );
View Full Code Here

Examples of org.jboss.jandex.AnnotationInstance

        cascadeValue = AnnotationValue.createArrayValue( "cascade", cascades );

      }
      newAnnotationValueList.add( cascadeValue );

      AnnotationInstance newAnnotationInstance = MockHelper.create(
          annotationInstance.name(),
          annotationInstance.target(),
          MockHelper.toArray( newAnnotationValueList )
      );
      newAnnotationInstanceList.add( newAnnotationInstance );
View Full Code Here

Examples of org.jboss.jandex.AnnotationInstance

              secondaryTableAnnotationInstanceArray[i],
              defaults
          )
          );
        }
        AnnotationInstance secondaryTablesAnnotationInstance = MockHelper.create(
            annName,
            annotationInstance.target(),
            new AnnotationValue[] {
                AnnotationValue.createArrayValue( "value", newAnnotationValueArray )
            }
View Full Code Here

Examples of org.jboss.jandex.AnnotationInstance

  @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

Examples of org.jboss.jandex.AnnotationInstance

          break;
        case ATTRIBUTE:
          List<AnnotationInstance> indexedAnnotationInstanceList = map.get( entityAnnName );
          Iterator<AnnotationInstance> iter = indexedAnnotationInstanceList.iterator();
          while ( iter.hasNext() ) {
            AnnotationInstance ann = iter.next();
            if ( MockHelper.targetEquals( target, ann.target() ) ) {
              iter.remove();
            }
          }
          break;
      }
View Full Code Here

Examples of org.jboss.jandex.AnnotationInstance

        metadataSources.annotatedMappingClassNames.add( className );
        continue;
      }

      // logic here assumes an entity is not also a converter...
      AnnotationInstance converterAnnotation = JandexHelper.getSingleAnnotation(
          classInfo.annotations(),
          JPADotNames.CONVERTER
      );
      if ( converterAnnotation != null ) {
        metadataSources.converterDescriptors.add(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.