/** * Visit the type and a given parameter. * * @param type visited type. * @return visiting result. */ public final T visit(final Type type) { assert type != null; if (type instanceof Class) { return onClass((Class) type); } if (type instanceof ParameterizedType) { return onParameterizedType((ParameterizedType) type); } if (type instanceof GenericArrayType) { return onGenericArray((GenericArrayType) type); } if (type instanceof WildcardType) { return onWildcard((WildcardType) type); } if (type instanceof TypeVariable) { return onVariable((TypeVariable) type); } // covered all the cases assert false; throw createError(type); }
/** * Get the {@link Class} representation of the given type. * <p/> * This corresponds to the notion of the erasure in JSR-14. * * @param type type to provide the erasure for. * @return the given type's erasure. */ @SuppressWarnings("unchecked") public static <T> Class<T> erasure(final Type type) { return eraser.visit(type); }
/** * Visit the type and a given parameter. * * @param type visited type. * @return visiting result. */ public final T visit(final Type type) { assert type != null; if (type instanceof Class) { return onClass((Class) type); } if (type instanceof ParameterizedType) { return onParameterizedType((ParameterizedType) type); } if (type instanceof GenericArrayType) { return onGenericArray((GenericArrayType) type); } if (type instanceof WildcardType) { return onWildcard((WildcardType) type); } if (type instanceof TypeVariable) { return onVariable((TypeVariable) type); } // covered all the cases assert false; throw createError(type); }
/** * Get the {@link Class} representation of the given type. * <p/> * This corresponds to the notion of the erasure in JSR-14. * * @param type type to provide the erasure for. * @return the given type's erasure. */ @SuppressWarnings("unchecked") public static <T> Class<T> erasure(final Type type) { return eraser.visit(type); }
/** * Visit the type and a given parameter. * * @param type visited type. * @return visiting result. */ public final T visit(final Type type) { assert type != null; if (type instanceof Class) { return onClass((Class) type); } if (type instanceof ParameterizedType) { return onParameterizedType((ParameterizedType) type); } if (type instanceof GenericArrayType) { return onGenericArray((GenericArrayType) type); } if (type instanceof WildcardType) { return onWildcard((WildcardType) type); } if (type instanceof TypeVariable) { return onVariable((TypeVariable) type); } // covered all the cases assert false; throw createError(type); }
/** * Get the {@link Class} representation of the given type. * <p/> * This corresponds to the notion of the erasure in JSR-14. * * @param type type to provide the erasure for. * @return the given type's erasure. */ @SuppressWarnings("unchecked") public static <T> Class<T> erasure(final Type type) { return eraser.visit(type); }
/** * Visit the type and a given parameter. * * @param type visited type. * @return visiting result. */ public final T visit(final Type type) { assert type != null; if (type instanceof Class) { return onClass((Class) type); } if (type instanceof ParameterizedType) { return onParameterizedType((ParameterizedType) type); } if (type instanceof GenericArrayType) { return onGenericArray((GenericArrayType) type); } if (type instanceof WildcardType) { return onWildcard((WildcardType) type); } if (type instanceof TypeVariable) { return onVariable((TypeVariable) type); } // covered all the cases assert false; throw createError(type); }
/** * Get the {@link Class} representation of the given type. * <p/> * This corresponds to the notion of the erasure in JSR-14. * * @param type type to provide the erasure for. * @return the given type's erasure. */ @SuppressWarnings("unchecked") public static <T> Class<T> erasure(final Type type) { return eraser.visit(type); }
/** * Visit the type and a given parameter. * * @param type visited type. * @return visiting result. */ public final T visit(final Type type) { assert type != null; if (type instanceof Class) { return onClass((Class) type); } if (type instanceof ParameterizedType) { return onParameterizedType((ParameterizedType) type); } if (type instanceof GenericArrayType) { return onGenericArray((GenericArrayType) type); } if (type instanceof WildcardType) { return onWildcard((WildcardType) type); } if (type instanceof TypeVariable) { return onVariable((TypeVariable) type); } // covered all the cases assert false; throw createError(type); }
/** * Get the {@link Class} representation of the given type. * <p/> * This corresponds to the notion of the erasure in JSR-14. * * @param type type to provide the erasure for. * @return the given type's erasure. */ @SuppressWarnings("unchecked") public static <T> Class<T> erasure(final Type type) { return eraser.visit(type); }
/** * Visit the type and a given parameter. * * @param type visited type. * @return visiting result. */ public final T visit(final Type type) { assert type != null; if (type instanceof Class) { return onClass((Class) type); } if (type instanceof ParameterizedType) { return onParameterizedType((ParameterizedType) type); } if (type instanceof GenericArrayType) { return onGenericArray((GenericArrayType) type); } if (type instanceof WildcardType) { return onWildcard((WildcardType) type); } if (type instanceof TypeVariable) { return onVariable((TypeVariable) type); } // covered all the cases assert false; throw createError(type); }
/** * Get the {@link Class} representation of the given type. * <p/> * This corresponds to the notion of the erasure in JSR-14. * * @param type type to provide the erasure for. * @return the given type's erasure. */ @SuppressWarnings("unchecked") public static <T> Class<T> erasure(final Type type) { return eraser.visit(type); }
/** * Visit the type and a given parameter. * * @param type visited type. * @return visiting result. */ public final T visit(final Type type) { assert type != null; if (type instanceof Class) { return onClass((Class) type); } if (type instanceof ParameterizedType) { return onParameterizedType((ParameterizedType) type); } if (type instanceof GenericArrayType) { return onGenericArray((GenericArrayType) type); } if (type instanceof WildcardType) { return onWildcard((WildcardType) type); } if (type instanceof TypeVariable) { return onVariable((TypeVariable) type); } // covered all the cases assert false; throw createError(type); }
/** * Get the {@link Class} representation of the given type. * <p/> * This corresponds to the notion of the erasure in JSR-14. * * @param type type to provide the erasure for. * @return the given type's erasure. */ @SuppressWarnings("unchecked") public static <T> Class<T> erasure(final Type type) { return eraser.visit(type); }