Create a new PathBuilder instance for the given type

@param type type of expression
@return new PathBuilder instance
513231
@SuppressWarnings("unchecked")
    public <T> PathBuilder<T> create(Class<T> type) {
        PathBuilder<T> rv = (PathBuilder<T>) paths.get(type);
        if (rv == null) {
            rv = new PathBuilder<T>(type, variableName(type));
            paths.put(type, rv);
        }
        return rv;
    }
626589
@SuppressWarnings("unchecked")
    protected <A, E extends SimpleExpression<? super A>> ListPath<A, E> createList(String property, Class<? super A> type, Class<? super E> queryType, PathInits inits) {
        return add(new ListPath<A, E>(type, (Class) queryType, forProperty(property), inits));
    }
726242
public static <E, Q extends SimpleExpression<? super E>> CollectionPath<E, Q> collectionPath(Class<E> type, Class<Q> queryType, PathMetadata metadata) {
        return new CollectionPath<E, Q>(type, queryType, metadata);
    }
570280
public <T> T createInstance(Class<T> type, String typeName) {
        try {
            return type.cast(getType(typeName).newInstance());
        } catch (InstantiationException | IllegalAccessException e) {
            throw new IllegalArgumentException("Cannot create instance of class " + type.getName(), e);
        }
    }
1334467
public static <T extends Comparable<?>> TimePath<T> timePath(Class<? extends T> type, PathMetadata metadata) {
        return new TimePath<T>(type, metadata);
    }
271647
public static <T> SimplePath<T> simplePath(Class<? extends T> type, Path<?> parent, String property) {
        return new SimplePath<T>(type, PathMetadataFactory.forProperty(parent, property));
    }
1111141
public static <T> RuntimeSchema<T> createFrom(Class<T> typeClass,
            IdStrategy strategy)
    {
        return createFrom(typeClass, NO_EXCLUSIONS, strategy);
    }
419330
public static ExpressionConstructor constructor(Class<?> type, Expression... fields) {
		return new ExpressionConstructor(type, asList(fields));
	}
453672
public static Object createInstance(Class<?> type)
    {
        Object instance=null;
        try
        {
            //create instance
            instance=type.newInstance();
        }
        catch(Exception exception)
        {
            throw new FaxException("Unable to create new instance of type: "+type,exception);
        }
        
        return instance;
    }
1163162
public static <K, V, E extends SimpleExpression<? super V>> MapPath<K,V,E> mapPath(Class<? super K> keyType,
                                                                                       Class<? super V> valueType,
                                                                                       Class<E> queryType,
                                                                                       PathMetadata metadata) {
        return new MapPath<K,V,E>(keyType, valueType, queryType, metadata);
    }
928356
public MethodDeclarationBuilder param(Type type, String name) {
    return new MethodDeclarationBuilder(
            builder,
            classIdentifier,
            memberFlags,
            returnType,
            methodName,
            methodHandler,
            parameters.append(new Parameter(type, name, parameters.size())));
  }
645622
public static Converter<String, Object> createPathParamConverter(final Type resultType) {
    if (!(resultType instanceof Class)) {
      throw new IllegalArgumentException("Unsupported @PathParam type " + resultType);
    }
    return new Converter<String, Object>() {
      @Override
      public Object convert(String value) {
        return ConvertUtils.convert(value, (Class<?>) resultType);
      }
    };
  }
1059955
public static RouteMeta build(RouteType type, Class<?> destination, String path, String group, int priority, int extra) {
        return new RouteMeta(type, null, destination, null, path, group, null, priority, extra);
    }
621654
private <T> Instantiator<T> getByDefaultConstructor(TypeToken<T> type) {
    try {
      final Constructor<? super T> defaultCons = type.getRawType().getDeclaredConstructor();
      defaultCons.setAccessible(true);

      return new Instantiator<T>() {
        @Override
        public T create() {
          try {
            return (T) defaultCons.newInstance();
          } catch (Exception e) {
            throw Throwables.propagate(e);
          }
        }
      };

    } catch (NoSuchMethodException e) {
      return null;
    }
  }
1023420
public static <T> Builder<T> arrayOf(TypeReference<T> type)
    {
        return builder(type).withHeader(StandardStreamCallbacks.ARRAY_HEADER).withFooter(StandardStreamCallbacks.ARRAY_FOOTER);
    }
161730
public static Object createInstanceByType(Class<?> type, Object... args) throws Exception {
		if (args.length == 0) {
			Constructor<?> constructor = type.getConstructor();
			return constructor.newInstance();
		} else {
			throw new UnsupportedException(null, "NOT_SUPPORTED", "Constructors with parameters are not supported");
		}
	}
1233774
public static <T> Path<T> path(Class<? extends T> type, Path<?> parent, String property) {
        return new PathImpl<T>(type, parent, property);
    }