Package org.jboss.jandex

Examples of org.jboss.jandex.AnnotationInstance


    return new CompositeAttributeTypeResolver( new AttributeTypeResolverImpl( this ) );
  }

  private boolean ignoreNotFound() {
    NotFoundAction action = NotFoundAction.EXCEPTION;
    AnnotationInstance notFoundAnnotation = JandexHelper.getSingleAnnotation(
        annotations(),
        HibernateDotNames.NOT_FOUND
    );
    if ( notFoundAnnotation != null ) {
      AnnotationValue actionValue = notFoundAnnotation.value( "action" );
      if ( actionValue != null ) {
        action = Enum.valueOf( NotFoundAction.class, actionValue.asEnum() );
      }
    }
View Full Code Here


  }

  private String determineReferencedEntityType(AnnotationInstance associationAnnotation) {
    String targetTypeName = getAttributeType().getName();

    AnnotationInstance targetAnnotation = JandexHelper.getSingleAnnotation(
        annotations(),
        HibernateDotNames.TARGET
    );
    if ( targetAnnotation != null ) {
      targetTypeName = targetAnnotation.value().asClass().name().toString();
    }

    AnnotationValue targetEntityValue = associationAnnotation.value( "targetEntity" );
    if ( targetEntityValue != null ) {
      targetTypeName = targetEntityValue.asClass().name().toString();
View Full Code Here

  }

  private FetchMode determineFetchMode() {
    FetchMode mode = FetchMode.DEFAULT;

    AnnotationInstance fetchAnnotation = JandexHelper.getSingleAnnotation( annotations(), HibernateDotNames.FETCH );
    if ( fetchAnnotation != null ) {
      org.hibernate.annotations.FetchMode annotationFetchMode = JandexHelper.getEnumValue(
          fetchAnnotation,
          "value",
          org.hibernate.annotations.FetchMode.class
View Full Code Here

    return mode;
  }

  private String determineMapsId() {
    String referencedIdAttributeName;
    AnnotationInstance mapsIdAnnotation = JandexHelper.getSingleAnnotation( annotations(), JPADotNames.MAPS_ID );
    if ( mapsIdAnnotation == null ) {
      return null;
    }

    if ( !( AttributeNature.MANY_TO_ONE.equals( getAssociationNature() ) || AttributeNature.MANY_TO_ONE
View Full Code Here

        }
    }

    private static WebContextAnnotationWrapper getWebContextWrapper(final ClassInfo webServiceClassInfo) {
        if (!webServiceClassInfo.annotations().containsKey(WEB_CONTEXT_ANNOTATION)) return new WebContextAnnotationWrapper(null);
        final AnnotationInstance webContextAnnotation = webServiceClassInfo.annotations().get(WEB_CONTEXT_ANNOTATION).get(0);
        return new WebContextAnnotationWrapper(webContextAnnotation);
    }
View Full Code Here

            }
        }

        // process @RolesAllowed annotation
        if (webServiceClassInfo.annotations().containsKey(ROLES_ALLOWED_ANNOTATION)) {
        final AnnotationInstance allowedRoles = webServiceClassInfo.annotations().get(ROLES_ALLOWED_ANNOTATION).get(0);
            for (final String roleName : allowedRoles.value().asStringArray()) {
                securityRoles.add(roleName);
            }
        }

        return (securityRoles.size() > 0) ? Collections.unmodifiableSet(securityRoles) : Collections.<String>emptySet();
View Full Code Here

            }
        }
    }

    private static String getUrlPattern(final ClassInfo clazz) {
        final AnnotationInstance webServiceAnnotation = getWebServiceAnnotation(clazz);
        final String serviceName = getStringAttribute(webServiceAnnotation, "serviceName");
        return "/" + (serviceName != null ? serviceName : clazz.name().local());
    }
View Full Code Here

          + " class.");
     
    } else {
      // found single PA
     
      AnnotationInstance annotationInstance = processApplicationAnnotations.get(0);     
      ClassInfo paClassInfo = (ClassInfo) annotationInstance.target();
      String paClassName = paClassInfo.name().toString();
     
      ComponentDescription paComponent = null;
     
      // it can either be a Servlet Process Application or a Singleton Session Bean Component or
View Full Code Here

          + " class.");
     
    } else {
      // found single PA
     
      AnnotationInstance annotationInstance = processApplicationAnnotations.get(0);     
      ClassInfo paClassInfo = (ClassInfo) annotationInstance.target();
      String paClassName = paClassInfo.name().toString();
     
      ComponentDescription paComponent = null;
     
      // it can either be a Servlet Process Application or a Singleton Session Bean Component or
View Full Code Here

        deploymentServiceNames.add(deploymentServiceName);

      }
    }

    AnnotationInstance postDeploy = ProcessApplicationAttachments.getPostDeployDescription(deploymentUnit);
    AnnotationInstance preUndeploy = ProcessApplicationAttachments.getPreUndeployDescription(deploymentUnit);

    // register the managed process application start service
    ProcessApplicationStartService paStartService = new ProcessApplicationStartService(deploymentServiceNames, postDeploy, preUndeploy, module);
    ServiceBuilder<ProcessApplicationStartService> serviceBuilder = phaseContext.getServiceTarget().addService(paStartServiceName, paStartService)
      .addDependency(phaseContext.getPhaseServiceName())
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.