Examples of optional()


Examples of org.qi4j.api.composite.TransientDescriptor.optional()

                        DependencyDescriptor descriptor = (DependencyDescriptor) visited;
                        Node node = document.createElement( "dependency" );

                        addAttribute( "annotation", descriptor.injectionAnnotation().toString(), node );
                        addAttribute( "injection", descriptor.injectionType().toString(), node );
                        addAttribute( "optional", Boolean.toString( descriptor.optional() ), node );

                        current.push( node );
                    }
                    else
                    {
View Full Code Here

Examples of org.qi4j.api.mixin.MixinDescriptor.optional()

                        DependencyDescriptor descriptor = (DependencyDescriptor) visited;
                        Node node = document.createElement( "dependency" );

                        addAttribute( "annotation", descriptor.injectionAnnotation().toString(), node );
                        addAttribute( "injection", descriptor.injectionType().toString(), node );
                        addAttribute( "optional", Boolean.toString( descriptor.optional() ), node );

                        current.push( node );
                    }
                    else
                    {
View Full Code Here

Examples of org.scf4j.Property.optional()

    Object nested = checkNested(properties, method.getReturnType(), propertyPath);
    if (nested != null) {
      propertyMapping.put(method, nested);
    } else  if (value != null) {
      propertyMapping.put(method, getCoercer().coerce(value, method.getReturnType()));
    } else if (property.optional()) {
      propertyMapping.put(method, getCoercer().coerce(property.value(), method.getReturnType()));
    } else {
      throw new ConfigurationException(Messages.getString("required.property.0.is.missing", propertyPath));
    }
  }
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.