Examples of optional()


Examples of com.avast.syringe.config.ConfigProperty.optional()

                ConfigProperty configParam = field.getAnnotation(ConfigProperty.class);
                if (configParam != null) {
                    InjectableProperty property = new ReflectionInjectableProperty(
                            field,
                            configParam.optional(),
                            configParam.name(),
                            configParam.habitat(),
                            configParam.delegate(),
                            converter
                    );
View Full Code Here

Examples of com.foreach.across.core.annotations.AcrossDepends.optional()

   */
  public static boolean applies( AcrossBootstrapConfig config, Class<?> classToCheck ) {
    AcrossDepends dependsAnnotation = classToCheck.getAnnotation( AcrossDepends.class );

    return dependsAnnotation == null
        || applies( config, dependsAnnotation.required(), dependsAnnotation.optional() );
  }

  /**
   * Checks if the required and optional dependencies apply against a given bootstrap configuration.
   *
 
View Full Code Here

Examples of com.google.inject.Inject.optional()

        if (javaxInject == null) {
          continue;
        }
        optional = false;
      } else {
        optional = guiceInject.optional();
      }

      if (optional) {
        errors.optionalConstructor(constructor);
      }
View Full Code Here

Examples of com.google.inject.Inject.optional()

      {
        try
        {
          Annotation bindingAnnotation = findBindingAnnotation(field.getAnnotations());
          final IProxyTargetLocator locator = new GuiceProxyTargetLocator(field,
            bindingAnnotation, injectAnnotation != null ? injectAnnotation.optional() : false);

          if (wrapInProxies)
          {
            target = LazyInitProxyFactory.createProxy(field.getType(), locator);
          }
View Full Code Here

Examples of com.google.inject.Inject.optional()

      javax.inject.Inject javaxInjectAnnotation = field.getAnnotation(javax.inject.Inject.class);
      if (!Modifier.isStatic(field.getModifiers()) && (injectAnnotation != null || javaxInjectAnnotation != null))
      {
        try
        {
          boolean optional = injectAnnotation != null && injectAnnotation.optional();
          Annotation bindingAnnotation = findBindingAnnotation(field.getAnnotations());
          final IProxyTargetLocator locator = new GuiceProxyTargetLocator(field, bindingAnnotation, optional);

          if (wrapInProxies)
          {
View Full Code Here

Examples of com.orientechnologies.common.console.annotation.ConsoleParameter.optional()

            final Annotation[] paramAnn = m.getParameterAnnotations()[paramNum];
            if (paramAnn != null)
              for (int annNum = paramAnn.length - 1; annNum > -1; annNum--) {
                if (paramAnn[annNum] instanceof ConsoleParameter) {
                  final ConsoleParameter annotation = (ConsoleParameter) paramAnn[annNum];
                  if (annotation.optional())
                    commandWords = OArrays.copyOf(commandWords, commandWords.length + 1);
                  break;
                }
              }
          }
View Full Code Here

Examples of com.volantis.testtools.mock.method.Occurrences.optional()

        return occurrences.min(minimum);
    }

    public void optional() {
        Occurrences occurrences = getOccurences();
        occurrences.optional();
    }

    public void unbounded() {
        Occurrences occurrences = getOccurences();
        occurrences.unbounded();
View Full Code Here

Examples of hudson.Extension.optional()

    public static Boolean isOptional(final Class<?> type) {
        if (type != null) {
            Extension extension = type.getAnnotation(Extension.class);
            if (extension != null) {
                return Boolean.valueOf(extension.optional());
            }
            ExtensionQualifier qualifier = type.getAnnotation(ExtensionQualifier.class);
            if (qualifier != null) {
                return Boolean.valueOf(qualifier.extension().optional());
            }
View Full Code Here

Examples of it.halfone.regex.Regex.optional()

      if (matcher.group(2).equals("*")) {
        regexList.add(r.star());
      } else if (matcher.group(2).equals("+")) {
        regexList.add(r.atLeastOnce());
      } else if (matcher.group(2).equals("?")) {
        regexList.add(r.optional());
      }
     
      ctx.setValue("token", token);
      ctx.setValue("index", ++index);
      }
View Full Code Here

Examples of javax.persistence.Basic.optional()

    Basic basicAnn = _field.getAnnotation(Basic.class);
    if (basicAnn != null) {
      _fetch = basicAnn.fetch();
      _isOptional = basicAnn.optional();
    }
  
    Column columnAnn = _field.getAnnotation(Column.class);
   
    if (columnAnn != null)
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.