@SuppressWarnings("unchecked")
    protected <A> Class<? extends A> validate(String property, Class<A> propertyType) {
        Class<A> validatedType = (Class<A>) validator.validate(getType(), property, propertyType);
        if (validatedType != null) {
            return validatedType;
        } else {
            throw new IllegalArgumentException("Illegal property " + property);
        }
    }
Creates a new PathBuilder instance

@param type type of the expression
@param variable variable name
querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java