Examples of ValueTypeFactory


Examples of org.crsh.cli.type.ValueTypeFactory

  public CommandFactory() {
    this.valueTypeFactory = ValueTypeFactory.DEFAULT;
  }

  public CommandFactory(ClassLoader loader) throws NullPointerException {
    this(new ValueTypeFactory(loader));
  }
View Full Code Here

Examples of org.crsh.cli.type.ValueTypeFactory

        } else {
          return super.getResources(name);
        }
      }
    };
    ValueTypeFactory factory = new ValueTypeFactory(cl);
    ValueType<Custom> custom = factory.get(Custom.class);
    assertNotNull(custom);
  }
View Full Code Here

Examples of org.lilyproject.repository.api.ValueTypeFactory

    public ValueType getValueType(String valueTypeSpec) throws RepositoryException, InterruptedException {
        ValueType valueType;

        int indexOfParams = valueTypeSpec.indexOf("<");
        if (indexOfParams == -1) {
            ValueTypeFactory valueTypeFactory = valueTypeFactories.get(valueTypeSpec);
            if (valueTypeFactory == null) {
                throw new TypeException("Unkown value type: " + valueTypeSpec);
            }
            valueType = valueTypeFactory.getValueType(null);
        } else {
            if (!valueTypeSpec.endsWith(">")) {
                throw new IllegalArgumentException("Invalid value type string, no closing angle bracket: '" +
                        valueTypeSpec + "'");
            }

            String arg = valueTypeSpec.substring(indexOfParams + 1, valueTypeSpec.length() - 1);

            if (arg.length() == 0) {
                throw new IllegalArgumentException("Invalid value type string, type arg is zero length: '" +
                        valueTypeSpec + "'");
            }

            ValueTypeFactory valueTypeFactory = valueTypeFactories.get(valueTypeSpec.substring(0, indexOfParams));
            if (valueTypeFactory == null) {
                throw new TypeException("Unkown value type: " + valueTypeSpec);
            }
            valueType = valueTypeFactory.getValueType(arg);
        }

        return valueType;
    }
View Full Code Here

Examples of org.qi4j.runtime.types.ValueTypeFactory

    @Override
    public void bind( Resolution resolution )
        throws BindingException
    {
        ValueTypeFactory factory = ValueTypeFactory.instance();
        Class<?> declaringClass = ( (Member) accessor() ).getDeclaringClass();
        Class<?> mainType = first( resolution.model().types() );
        valueType = factory.newValueType( type(), declaringClass, mainType, resolution.layer(), resolution.module() );

        builderInfo = new BuilderPropertyInfo();

        if( type instanceof TypeVariable )
        {
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.