Examples of asEnum()


Examples of org.jboss.jandex.AnnotationValue.asEnum()

    protected TransactionManagementType fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) {
        final AnnotationValue value = annotationInstance.value();
        if(value == null) {
            return TransactionManagementType.CONTAINER;
        }
        return TransactionManagementType.valueOf(value.asEnum());
    }
}
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue.asEnum()

    @Override
    protected AccessTimeoutDetails fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) {
        final long timeout = annotationInstance.value().asLong();
        AnnotationValue unitAnnVal = annotationInstance.value("unit");
        final TimeUnit unit = unitAnnVal != null ? TimeUnit.valueOf(unitAnnVal.asEnum()) : TimeUnit.MILLISECONDS;
        return new AccessTimeoutDetails(timeout, unit);
    }
}
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue.asEnum()

        final AnnotationValue value = annotationInstance.value();
        if(value == null) {
            return TransactionAttributeType.REQUIRED;
        }
        return TransactionAttributeType.valueOf(value.asEnum());
    }
}
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue.asEnum()

    protected ConcurrencyManagementType fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) {
        final AnnotationValue value = annotationInstance.value();
        if(value == null) {
            return ConcurrencyManagementType.CONTAINER;
        }
        return ConcurrencyManagementType.valueOf(value.asEnum());
    }
}
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue.asEnum()

    protected StatefulTimeoutInfo fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) {
        final long value = annotationInstance.value().asLong();
        final AnnotationValue unitValue = annotationInstance.value("unit");
        final TimeUnit unit;
        if (unitValue != null) {
            unit = TimeUnit.valueOf(unitValue.asEnum());
        } else {
            unit = TimeUnit.MINUTES;
        }
        return new StatefulTimeoutInfo(value, unit);
    }
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue.asEnum()

    @Override
    protected Integer fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) {
        final long timeout = annotationInstance.value().asLong();
        AnnotationValue unitAnnVal = annotationInstance.value("unit");
        final TimeUnit unit = unitAnnVal != null ? TimeUnit.valueOf(unitAnnVal.asEnum()) : TimeUnit.SECONDS;
        return (int) unit.toSeconds(timeout);
    }
}
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue.asEnum()

                List<String> rolesAllowed = new ArrayList<String>();
                if (httpConstraintValue != null) {
                    AnnotationInstance httpConstraint = httpConstraintValue.asNested();
                    AnnotationValue httpConstraintERSValue = httpConstraint.value();
                    if (httpConstraintERSValue != null) {
                        servletSecurity.setEmptyRoleSemantic(EmptyRoleSemanticType.valueOf(httpConstraintERSValue.asEnum()));
                    }
                    AnnotationValue httpConstraintTGValue = httpConstraint.value("transportGuarantee");
                    if (httpConstraintTGValue != null) {
                        servletSecurity.setTransportGuarantee(TransportGuaranteeType.valueOf(httpConstraintTGValue.asEnum()));
                    }
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue.asEnum()

                    if (httpConstraintERSValue != null) {
                        servletSecurity.setEmptyRoleSemantic(EmptyRoleSemanticType.valueOf(httpConstraintERSValue.asEnum()));
                    }
                    AnnotationValue httpConstraintTGValue = httpConstraint.value("transportGuarantee");
                    if (httpConstraintTGValue != null) {
                        servletSecurity.setTransportGuarantee(TransportGuaranteeType.valueOf(httpConstraintTGValue.asEnum()));
                    }
                    AnnotationValue rolesAllowedValue = httpConstraint.value("rolesAllowed");
                    if (rolesAllowedValue != null) {
                        for (String role : rolesAllowedValue.asStringArray()) {
                            rolesAllowed.add(role);
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue.asEnum()

                            if (httpMethodConstraintValue != null) {
                                methodConstraint.setMethod(httpMethodConstraintValue.asString());
                            }
                            AnnotationValue httpMethodConstraintERSValue = httpMethodConstraint.value("emptyRoleSemantic");
                            if (httpMethodConstraintERSValue != null) {
                                methodConstraint.setEmptyRoleSemantic(EmptyRoleSemanticType.valueOf(httpMethodConstraintERSValue.asEnum()));
                            }
                            AnnotationValue httpMethodConstraintTGValue = httpMethodConstraint.value("transportGuarantee");
                            if (httpMethodConstraintTGValue != null) {
                                methodConstraint.setTransportGuarantee(TransportGuaranteeType.valueOf(httpMethodConstraintTGValue.asEnum()));
                            }
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue.asEnum()

                            if (httpMethodConstraintERSValue != null) {
                                methodConstraint.setEmptyRoleSemantic(EmptyRoleSemanticType.valueOf(httpMethodConstraintERSValue.asEnum()));
                            }
                            AnnotationValue httpMethodConstraintTGValue = httpMethodConstraint.value("transportGuarantee");
                            if (httpMethodConstraintTGValue != null) {
                                methodConstraint.setTransportGuarantee(TransportGuaranteeType.valueOf(httpMethodConstraintTGValue.asEnum()));
                            }
                            AnnotationValue rolesAllowedValue = httpMethodConstraint.value("rolesAllowed");
                            rolesAllowed = new ArrayList<String>();
                            if (rolesAllowedValue != null) {
                                for (String role : rolesAllowedValue.asStringArray()) {
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.