mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
change line sep
This commit is contained in:
@@ -1,67 +1,67 @@
|
||||
/*
|
||||
* Copyright (C) 2017 hutool.cn
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.hutool;
|
||||
|
||||
import cn.hutool.core.lang.ConsoleTable;
|
||||
import cn.hutool.core.util.ClassUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Hutool是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Hutool中的工具方法来自于每个用户的精雕细琢,它涵盖了Java开发底层代码中的方方面面,它既是大型项目开发中解决小问题的利器,也是小型项目中的效率担当;<br>
|
||||
* </p>
|
||||
*
|
||||
* <p>Hutool是项目中“util”包友好的替代,它节省了开发人员对项目中公用类和公用工具方法的封装时间,使开发专注于业务,同时可以最大限度的避免封装不完善带来的bug。</p>
|
||||
*
|
||||
* @author Looly
|
||||
*/
|
||||
public class Hutool {
|
||||
|
||||
public static final String AUTHOR = "Looly";
|
||||
|
||||
private Hutool() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示Hutool所有的工具类
|
||||
*
|
||||
* @return 工具类名集合
|
||||
* @since 5.5.2
|
||||
*/
|
||||
public static Set<Class<?>> getAllUtils() {
|
||||
return ClassUtil.scanPackage("cn.hutool",
|
||||
(clazz) -> (false == clazz.isInterface()) && StrUtil.endWith(clazz.getSimpleName(), "Util"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制台打印所有工具类
|
||||
*/
|
||||
public static void printAllUtils() {
|
||||
final Set<Class<?>> allUtils = getAllUtils();
|
||||
final ConsoleTable consoleTable = ConsoleTable.create().addHeader("工具类名", "所在包");
|
||||
for (Class<?> clazz : allUtils) {
|
||||
consoleTable.addBody(clazz.getSimpleName(), clazz.getPackage().getName());
|
||||
}
|
||||
consoleTable.print();
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright (C) 2017 hutool.cn
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.hutool;
|
||||
|
||||
import cn.hutool.core.lang.ConsoleTable;
|
||||
import cn.hutool.core.util.ClassUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Hutool是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Hutool中的工具方法来自于每个用户的精雕细琢,它涵盖了Java开发底层代码中的方方面面,它既是大型项目开发中解决小问题的利器,也是小型项目中的效率担当;<br>
|
||||
* </p>
|
||||
*
|
||||
* <p>Hutool是项目中“util”包友好的替代,它节省了开发人员对项目中公用类和公用工具方法的封装时间,使开发专注于业务,同时可以最大限度的避免封装不完善带来的bug。</p>
|
||||
*
|
||||
* @author Looly
|
||||
*/
|
||||
public class Hutool {
|
||||
|
||||
public static final String AUTHOR = "Looly";
|
||||
|
||||
private Hutool() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示Hutool所有的工具类
|
||||
*
|
||||
* @return 工具类名集合
|
||||
* @since 5.5.2
|
||||
*/
|
||||
public static Set<Class<?>> getAllUtils() {
|
||||
return ClassUtil.scanPackage("cn.hutool",
|
||||
(clazz) -> (false == clazz.isInterface()) && StrUtil.endWith(clazz.getSimpleName(), "Util"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制台打印所有工具类
|
||||
*/
|
||||
public static void printAllUtils() {
|
||||
final Set<Class<?>> allUtils = getAllUtils();
|
||||
final ConsoleTable consoleTable = ConsoleTable.create().addHeader("工具类名", "所在包");
|
||||
for (Class<?> clazz : allUtils) {
|
||||
consoleTable.addBody(clazz.getSimpleName(), clazz.getPackage().getName());
|
||||
}
|
||||
consoleTable.print();
|
||||
}
|
||||
}
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* Hutool是Hu + tool的自造词,前者致敬我的“前任公司”,后者为工具之意,谐音“糊涂”,寓意追求“万事都作糊涂观,无所谓失,无所谓得”的境界。
|
||||
*
|
||||
* <p>
|
||||
* Hutool是一个Java工具包,也只是一个工具包,它帮助我们简化每一行代码,减少每一个方法,让Java语言也可以“甜甜的”。<br>
|
||||
* Hutool最初是我项目中“util”包的一个整理,后来慢慢积累并加入更多非业务相关功能,并广泛学习其它开源项目精髓,经过自己整理修改,最终形成丰富的开源工具集。
|
||||
* </p>
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* Hutool是Hu + tool的自造词,前者致敬我的“前任公司”,后者为工具之意,谐音“糊涂”,寓意追求“万事都作糊涂观,无所谓失,无所谓得”的境界。
|
||||
*
|
||||
* <p>
|
||||
* Hutool是一个Java工具包,也只是一个工具包,它帮助我们简化每一行代码,减少每一个方法,让Java语言也可以“甜甜的”。<br>
|
||||
* Hutool最初是我项目中“util”包的一个整理,后来慢慢积累并加入更多非业务相关功能,并广泛学习其它开源项目精髓,经过自己整理修改,最终形成丰富的开源工具集。
|
||||
* </p>
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
package cn.hutool;
|
Reference in New Issue
Block a user