Package org.jboss.jandex

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


  protected AnnotationInstance create(DotName name, AnnotationTarget target, List<AnnotationValue> annotationValueList) {
    return create( name, target, MockHelper.toArray( annotationValueList ) );
  }

  protected AnnotationInstance create(DotName name, AnnotationTarget target, AnnotationValue[] annotationValues) {
    AnnotationInstance annotationInstance = MockHelper.create( name, target, annotationValues );
    push( annotationInstance );
    return annotationInstance;

  }
View Full Code Here

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

  private AnnotationValue[] nestedJoinColumnList(String name, List<JaxbJoinColumn> columns, List<AnnotationValue> annotationValueList) {
    if ( MockHelper.isNotEmpty( columns ) ) {
      AnnotationValue[] values = new AnnotationValue[columns.size()];
      for ( int i = 0; i < columns.size(); i++ ) {
        AnnotationInstance annotationInstance = parserJoinColumn( columns.get( i ), null );
        values[i] = MockHelper.nestedAnnotationValue(
            "", annotationInstance
        );
      }
      MockHelper.addToCollectionIfNotNull(
View Full Code Here

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

  private AnnotationValue[] nestedMapKeyJoinColumnList(String name, List<JaxbMapKeyJoinColumn> columns, List<AnnotationValue> annotationValueList) {
    if ( MockHelper.isNotEmpty( columns ) ) {
      AnnotationValue[] values = new AnnotationValue[columns.size()];
      for ( int i = 0; i < columns.size(); i++ ) {
        AnnotationInstance annotationInstance = parserMapKeyJoinColumn( columns.get( i ), null );
        values[i] = MockHelper.nestedAnnotationValue(
            "", annotationInstance
        );
      }
      MockHelper.addToCollectionIfNotNull(
View Full Code Here

    this.embeddedAttributeName = embeddedAttributeName;
    this.parentReferencingAttributeName = checkParentAnnotation();
  }

  private String checkParentAnnotation() {
    AnnotationInstance parentAnnotation = JandexHelper.getSingleAnnotation(
        getClassInfo(),
        HibernateDotNames.PARENT
    );
    if ( parentAnnotation == null ) {
      return null;
    }
    else {
      return JandexHelper.getPropertyName( parentAnnotation.target() );
    }
  }
View Full Code Here

  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

  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

        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

TOP

Related Classes of org.jboss.jandex.AnnotationInstance

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.