public class App extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
caller
调用者所在路径,可能是目录,也可能是jar文件
|
protected static ClassComparator |
classComparator
类比较器
|
static Set<String> |
DIRECTORIES
扫描到的目录
|
static String |
frame
框架所在路径,可能是目录,也可能是jar文件
|
static Set<String> |
I18N
i18n文件名缓存
|
protected static Map<String,Map<Locale,String>> |
I18N_CACHE
i18n值缓存
|
static List<I18nResource> |
I18N_RESOURCE
所有扫描到的i18n缓存
|
static Map<String,List<String>> |
INTERFACE_IMPLEMENTS
接口实现类列表缓存
|
static Locale |
locale |
static String |
PACKAGE
框架包名
|
static Set<String> |
plugins |
static String |
root
应用根目录
|
| 限定符 | 构造器和说明 |
|---|---|
protected |
App() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addImplement(Class<?> klass) |
protected static void |
applyPlugins() |
static String |
getImplement(Class<?>... interfaceOrClasses)
从类或接口的实现类列表的交集(如果是接口,则它的所有实现类参与交集;如果不是接口,它自身参与交集)中取得一个默认实现类,默认实现类的挑选规则由扫描器指定。
|
static String |
getImplement(String... interfaceOrClassNames)
从类或接口的实现类列表的交集(如果是接口,则它的所有实现类参与交集;如果不是接口,它自身参与交集)中取得一个默认实现类,默认实现类的挑选规则由扫描器指定。
|
static List<String> |
getImplements(Class<?>... interfaceOrClasses)
获取类或接口的实现类列表的交集(如果是接口,则它的所有实现类参与交集;如果不是接口,它自身参与交集)。
|
static List<String> |
getImplements(String... interfaceOrClassNames)
获取类或接口的实现类列表的交集(如果是接口,则它的所有实现类参与交集;如果不是接口,它自身参与交集)。
|
protected static Set<String> |
getInterfaces(Class<?> klass) |
static String |
getProperty(Locale locale,
String key,
Object... params)
获取properties值
|
static String |
getProperty(String key,
Object... params)
获取properties值,默认使用请求客户端的locale,如果未设置则使用默认locale
|
static boolean |
getPropertyBoolean(String key,
boolean defaultValue)
获取properties的boolean值,如果获取不到或出错,返回默认值,不抛出异常
|
static double |
getPropertyDouble(String key,
double defaultValue)
获取properties的double值,如果获取不到或出错,返回默认值,不抛出异常
|
static float |
getPropertyFloat(String key,
float defaultValue)
获取properties的float值,如果获取不到或出错,返回默认值,不抛出异常
|
static int |
getPropertyInt(String key,
int defaultValue)
获取properties的int值,如果获取不到或出错,返回默认值,不抛出异常
|
static long |
getPropertyLong(String key,
long defaultValue)
获取properties的long值,如果获取不到或出错,返回默认值,不抛出异常
|
static short |
getPropertyShort(String key,
short defaultValue)
获取properties的short值,如果获取不到或出错,返回默认值,不抛出异常
|
static String |
getPropertyString(Locale locale,
String key,
String defaultValue)
获取properties的字符串值,如果获取不到或出错,返回默认值,不抛出异常
|
static String |
getPropertyString(String key,
String defaultValue)
获取properties的字符串值,如果获取不到或出错,返回默认值,不抛出异常
|
static IProxy |
getProxy()
获取代理接口
|
public static Locale locale
public static String root
public static String caller
public static String frame
public static final String PACKAGE
public static final List<I18nResource> I18N_RESOURCE
protected static ClassComparator classComparator
protected static void applyPlugins()
public static void addImplement(Class<?> klass)
public static String getProperty(String key, Object... params)
key - keyparams - 传入参数public static String getProperty(Locale locale, String key, Object... params)
locale - localekey - keyparams - 传入参数public static short getPropertyShort(String key, short defaultValue)
key - 键defaultValue - 默认值public static int getPropertyInt(String key, int defaultValue)
key - 键defaultValue - 默认值public static long getPropertyLong(String key, long defaultValue)
key - 键defaultValue - 默认值public static float getPropertyFloat(String key, float defaultValue)
key - 键defaultValue - 默认值public static double getPropertyDouble(String key, double defaultValue)
key - 键defaultValue - 默认值public static boolean getPropertyBoolean(String key, boolean defaultValue)
key - 键defaultValue - 默认值public static String getPropertyString(String key, String defaultValue)
key - 键defaultValue - 默认值public static String getPropertyString(Locale locale, String key, String defaultValue)
locale - localekey - 键defaultValue - 默认值public static IProxy getProxy()
public static List<String> getImplements(String... interfaceOrClassNames)
interfaceOrClassNames - 完整类或接口名public static List<String> getImplements(Class<?>... interfaceOrClasses)
interfaceOrClasses - 类或接口们public static String getImplement(String... interfaceOrClassNames)
interfaceOrClassNames - 完整类或接口名Copyright © 2023. All Rights Reserved.