Package org.jboss.jandex

Examples of org.jboss.jandex.AnnotationValue


    }

    @Override
    protected StatefulTimeoutInfo fromAnnotation(final AnnotationInstance annotationInstance) {
        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


    }

    @Override
    protected Integer fromAnnotation(final AnnotationInstance annotationInstance) {
        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

        super(LocalHome.class, null);
    }

    @Override
    protected String fromAnnotation(final AnnotationInstance annotationInstance) {
        AnnotationValue value = annotationInstance.value();
        return value.asClass().toString();
    }
View Full Code Here

        super(TransactionManagement.class, null);
    }

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

        super(Lock.class, null);
    }

    @Override
    protected LockType fromAnnotation(final AnnotationInstance annotationInstance) {
        AnnotationValue value = annotationInstance.value();
        if(value == null) {
            return LockType.WRITE;
        }
        return LockType.valueOf(annotationInstance.value().asEnum());
    }
View Full Code Here

    }

    @Override
    protected AccessTimeoutDetails fromAnnotation(final AnnotationInstance annotationInstance) {
        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

        super(RemoteHome.class, null);
    }

    @Override
    protected String fromAnnotation(final AnnotationInstance annotationInstance) {
        AnnotationValue value = annotationInstance.value();
        return value.asClass().toString();
    }
View Full Code Here

    }

    @Override
    protected TransactionAttributeType fromAnnotation(final AnnotationInstance annotationInstance) {

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

        super(Init.class, null);
    }

    @Override
    protected String fromAnnotation(final AnnotationInstance annotationInstance) {
        AnnotationValue value = annotationInstance.value();
        if (value == null) {
            return null;
        }
        return value.asString();
    }
View Full Code Here

                continue;
            }
            final String beanClassName = classInfo.name().toString();

            // Get the managed bean name from the annotation
            final AnnotationValue nameValue = instance.value();
            final String beanName = nameValue == null || nameValue.asString().isEmpty() ? beanClassName : nameValue.asString();
            final ComponentDescription componentDescription = new ComponentDescription(beanName, beanClassName, moduleDescription, applicationClasses.getOrAddClassByName(beanClassName), deploymentUnit.getServiceName(), applicationClasses);

            // Add the view
            ViewDescription viewDescription = new ViewDescription(componentDescription, beanClassName);
            viewDescription.getConfigurators().addFirst(new ViewConfigurator() {
View Full Code Here

TOP

Related Classes of org.jboss.jandex.AnnotationValue

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.