/** * Obtains a {@link ClassName} for a specified name. * * @param name the name of the {@link ClassName} * * @return a {@link ClassName} for the specified name */ public static ClassName of(String name) { return new ClassName(name); }
/** * Obtains a {@link ClassName} for a specified name. * * @param name the name of the {@link ClassName} * * @return a {@link ClassName} for the specified name */ public static ClassName of(String name) { return new ClassName(name); }
/** * Obtains a {@link ClassName} for a specified {@link Class}. * * @param classToUse the {@link Class} to use for determining the {@link ClassName} * * @return a {@link ClassName} for the specified {@link Class} */ public static ClassName of(Class<?> classToUse) { if (classToUse == null) { throw new IllegalArgumentException("ClassName's can't be null"); } else { return new ClassName(classToUse.getName()); } }
/** * Obtains a {@link ClassName} for a specified {@link Class}. * * @param classToUse the {@link Class} to use for determining the {@link ClassName} * * @return a {@link ClassName} for the specified {@link Class} */ public static ClassName of(Class<?> classToUse) { if (classToUse == null) { throw new IllegalArgumentException("ClassName's can't be null"); } else { return new ClassName(classToUse.getName()); } }