Package org.jboss.jandex

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


        }

        private boolean booleanValue(final AnnotationInstance annotation, final String attribute) {
            if (annotation == null) return false;
            final AnnotationValue value = annotation.value(attribute);
            return value != null ? value.asBoolean() : false;
        }
    }

}
View Full Code Here


    String proxyInterfaceClass = null;

    if ( proxyAnnotation != null ) {
      AnnotationValue lazyValue = proxyAnnotation.value( "lazy" );
      if ( lazyValue != null ) {
        lazy = lazyValue.asBoolean();
      }

      AnnotationValue proxyClassValue = proxyAnnotation.value( "proxyClass" );
      if ( proxyClassValue != null ) {
        proxyInterfaceClass = proxyClassValue.asString();
View Full Code Here

    String sql = customSQLAnnotation.value( "sql" ).asString();
    boolean isCallable = false;
    AnnotationValue callableValue = customSQLAnnotation.value( "callable" );
    if ( callableValue != null ) {
      isCallable = callableValue.asBoolean();
    }

    ResultCheckStyle checkStyle = ResultCheckStyle.NONE;
    AnnotationValue checkStyleValue = customSQLAnnotation.value( "check" );
    if ( checkStyleValue != null ) {
View Full Code Here

      }
      this.isLazy = fetchType == FetchType.LAZY;

      AnnotationValue optionalValue = basicAnnotation.value( "optional" );
      if ( optionalValue != null ) {
        this.isOptional = optionalValue.asBoolean();
      }
    }
  }

  // TODO - there is more todo for updatable and insertable. Checking the @Generated annotation is only one part (HF)
View Full Code Here

                if (loadOnStartup != null && loadOnStartup.asInt() > 0) {
                    servlet.setLoadOnStartupInt(loadOnStartup.asInt());
                }
                AnnotationValue asyncSupported = annotation.value("asyncSupported");
                if (asyncSupported != null) {
                    servlet.setAsyncSupported(asyncSupported.asBoolean());
                }
                AnnotationValue initParamsValue = annotation.value("initParams");
                if (initParamsValue != null) {
                    AnnotationInstance[] initParamsAnnotations = initParamsValue.asNestedArray();
                    if (initParamsAnnotations != null && initParamsAnnotations.length > 0) {
View Full Code Here

                } else {
                    filter.setName(nameValue.asString());
                }
                AnnotationValue asyncSupported = annotation.value("asyncSupported");
                if (asyncSupported != null) {
                    filter.setAsyncSupported(asyncSupported.asBoolean());
                }
                AnnotationValue initParamsValue = annotation.value("initParams");
                if (initParamsValue != null) {
                    AnnotationInstance[] initParamsAnnotations = initParamsValue.asNestedArray();
                    if (initParamsAnnotations != null && initParamsAnnotations.length > 0) {
View Full Code Here

        return value == null ? null : value.asString();
    }

    private boolean asBool(final AnnotationInstance annotation, String property) {
        AnnotationValue value = annotation.value(property);
        return value == null ? true : value.asBoolean();
    }

    private String[] asArray(final AnnotationInstance annotation, String property) {
        AnnotationValue value = annotation.value(property);
        return value == null ? null : value.asStringArray();
View Full Code Here

            final MethodInfo targetMethod = (MethodInfo) removeAnnotation.target();
            final MethodIdentifier removeMethod = MethodIdentifier.getIdentifier(targetMethod.returnType().toString(), targetMethod.name(), toString(targetMethod.args()));
            final AnnotationValue retainIfExceptionAnnValue = removeAnnotation.value("retainIfException");
            boolean retainIfException = false;
            if (retainIfExceptionAnnValue != null) {
                retainIfException = retainIfExceptionAnnValue.asBoolean();
            }
            componentDescription.addRemoveMethod(removeMethod, retainIfException);
        }
    }
View Full Code Here

            }
            String exceptionClassName = ((ClassInfo) target).name().toString();
            boolean rollback = false;
            AnnotationValue rollBackAnnValue = annotationInstance.value("rollback");
            if (rollBackAnnValue != null) {
                rollback = rollBackAnnValue.asBoolean();
            }
            // default "inherited" is true
            boolean inherited = true;
            AnnotationValue inheritedAnnValue = annotationInstance.value("inherited");
            if (inheritedAnnValue != null) {
View Full Code Here

            }
            // default "inherited" is true
            boolean inherited = true;
            AnnotationValue inheritedAnnValue = annotationInstance.value("inherited");
            if (inheritedAnnValue != null) {
                inherited = inheritedAnnValue.asBoolean();
            }
            ejbJarDescription.addApplicationException(exceptionClassName, rollback, inherited);
        }
    }
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.