- AbstractInvocationHandler - cn.com.fishin.tuz.handler中的类
-
抽象的调用处理器
主要是为了动态代理模式准备的模板处理器
具体实现类参考:
- AbstractInvocationHandler(Object) - 类 的构造器cn.com.fishin.tuz.handler.AbstractInvocationHandler
-
使用被代理的目标对象来初始化这个处理器
Use a target object to init this handler
- AbstractJSONLoader - cn.com.fishin.tuz.loader中的类
-
JSON 配置文件抽象加载器
JSON resources loader
- AbstractJSONLoader(String) - 类 的构造器cn.com.fishin.tuz.loader.AbstractJSONLoader
-
使用一个符合 JSON 规范的字符串来初始化这个加载器
Use a standard JSON string to initialize this loader
- AbstractPropertiesLoader - cn.com.fishin.tuz.loader中的类
-
这个抽象类用于加载 .properties 文件
子类需要实现 loadProperties() 方法继而完善工作
This class is used to load .properties file
Subclass should override loadProperties() method
- AbstractPropertiesLoader() - 类 的构造器cn.com.fishin.tuz.loader.AbstractPropertiesLoader
-
- after(Interceptor[], InterceptedMethod) - 类 中的静态方法cn.com.fishin.tuz.helper.InterceptorHelper
-
完成一组拦截器的 after 方法
Invoke after method of these interceptors
- after(InterceptedMethod) - 类 中的方法cn.com.fishin.tuz.interceptor.DefaultInterceptor
-
- after(InterceptedMethod) - 接口 中的方法cn.com.fishin.tuz.interceptor.Interceptor
-
在执行切面方法之后执行这个方法
注意:
如果需要获取被拦截方法的执行结果,调用 cn.com.fishin.tuz.entity.InterceptedMethod#getResult()。
- afterReturning(Interceptor[], InterceptedMethod) - 类 中的静态方法cn.com.fishin.tuz.helper.InterceptorHelper
-
完成一组拦截器的 afterReturning 方法
Invoke afterReturning method of these interceptors
- afterReturning(InterceptedMethod) - 类 中的方法cn.com.fishin.tuz.interceptor.DefaultInterceptor
-
- afterReturning(InterceptedMethod) - 接口 中的方法cn.com.fishin.tuz.interceptor.Interceptor
-
在方法返回之后执行,实质是在 finally 块中执行
注意:
在执行这个方法的时候,由于被拦截的方法可能抛出了异常,所以这个时候有可能是拿不到返回值的,
不建议在这个方法中操作被拦截方法的执行结果
Invoke this method when intercepted method throws an exception
Notice:
When this method is invoking, you may not get the result of the intercepted method.
- afterThrowing(Interceptor[], InterceptedMethod) - 类 中的静态方法cn.com.fishin.tuz.helper.InterceptorHelper
-
完成一组拦截器的 afterThrowing 方法
Invoke afterThrowing method of these interceptors
- afterThrowing(InterceptedMethod) - 类 中的方法cn.com.fishin.tuz.interceptor.DefaultInterceptor
-
- afterThrowing(InterceptedMethod) - 接口 中的方法cn.com.fishin.tuz.interceptor.Interceptor
-
在执行切面方法抛出异常之后执行这个方法
注意:
在执行这个方法的时候,由于被拦截的方法抛出了异常,所以这个时候有可能是拿不到返回值的,
如果你需要返回结果,请调用 cn.com.fishin.tuz.entity.InterceptedMethod#setResult(java.lang.Object)。
- appendResource(Map<String, String>, String) - 类 中的静态方法cn.com.fishin.tuz.core.Tuz
-
往指定的 namespace 中添加新的资源值
Add one value to the pointed namespace
- appendResource(String, String, String) - 类 中的静态方法cn.com.fishin.tuz.core.Tuz
-
往指定的 namespace 中添加新的资源值
Add one value to the pointed namespace
- ClassHelper - cn.com.fishin.tuz.helper中的类
-
类帮助器
一些操作类的方法
Class helper
Some methods that used to operate class
- ClassHelper() - 类 的构造器cn.com.fishin.tuz.helper.ClassHelper
-
- classLoaderOf(Object) - 类 中的静态方法cn.com.fishin.tuz.helper.ClassHelper
-
获得这个对象的类加载器
实际上它就是在内部调用 classOf(obj).getClassLoader() 来获取类的类加载器的
这个方法的目的在于,提供更好的代码可读性和代码意义
Get the classloader of this object
In fact, it invokes classOf(obj).getClassLoader() to get what it needs
This method is to get more human-being and mean of the code
- classOf(Object) - 类 中的静态方法cn.com.fishin.tuz.helper.ClassHelper
-
获得这个对象的类的类型
实际上它就是在内部调用 obj.getClass() 来获取类的类型的
这个方法的目的在于,提供更好的代码可读性和代码意义
Get the class of this object
In fact, it invokes obj.getClass() to get what it needs
This method is to get more human-being and mean of the code
- ClasspathJSONLoader - cn.com.fishin.tuz.loader中的类
-
JSON 配置文件加载器
这个加载器专门用来加载类路径下的 json 配置文件,并返回 Map 集合
JSON file loader
This loader is used to load json file in classpath
- ClasspathJSONLoader(String) - 类 的构造器cn.com.fishin.tuz.loader.ClasspathJSONLoader
-
根据资源文件名称构建
Construct with resource file
- ClasspathJSONLoader(String, String) - 类 的构造器cn.com.fishin.tuz.loader.ClasspathJSONLoader
-
根据资源文件名称构建
Construct with resource file
- ClasspathJSONLoader(String, String, Charset) - 类 的构造器cn.com.fishin.tuz.loader.ClasspathJSONLoader
-
根据资源文件名称构建
Construct with resource file
- ClasspathJSONLoader(String, Charset) - 类 的构造器cn.com.fishin.tuz.loader.ClasspathJSONLoader
-
根据资源文件名称构建
Construct with resource file
- ClasspathPropertiesLoader - cn.com.fishin.tuz.loader中的类
-
Properties 配置文件加载器
这个加载器专门用来加载类路径下的 .properties 配置文件,并返回 Map 集合
Properties file loader
This loader is used to load .properties file in classpath
- ClasspathPropertiesLoader(String) - 类 的构造器cn.com.fishin.tuz.loader.ClasspathPropertiesLoader
-
根据资源文件名称构建
Construct with resource file
- ClasspathPropertiesLoader(String, String) - 类 的构造器cn.com.fishin.tuz.loader.ClasspathPropertiesLoader
-
根据资源文件名称构建
Construct with resource file
- ClasspathPropertiesLoader(String, String, Charset) - 类 的构造器cn.com.fishin.tuz.loader.ClasspathPropertiesLoader
-
根据资源文件名称构建
Construct with resource file
- ClasspathPropertiesLoader(String, Charset) - 类 的构造器cn.com.fishin.tuz.loader.ClasspathPropertiesLoader
-
根据资源文件名称构建
Construct with resource file
- cn.com.fishin.tuz.core - 程序包 cn.com.fishin.tuz.core
-
- cn.com.fishin.tuz.entity - 程序包 cn.com.fishin.tuz.entity
-
- cn.com.fishin.tuz.factory - 程序包 cn.com.fishin.tuz.factory
-
- cn.com.fishin.tuz.handler - 程序包 cn.com.fishin.tuz.handler
-
- cn.com.fishin.tuz.helper - 程序包 cn.com.fishin.tuz.helper
-
- cn.com.fishin.tuz.interceptor - 程序包 cn.com.fishin.tuz.interceptor
-
- cn.com.fishin.tuz.loader - 程序包 cn.com.fishin.tuz.loader
-
- cn.com.fishin.tuz.plugin - 程序包 cn.com.fishin.tuz.plugin
-
- connectToFTP(ServerAddress, LoginInfo) - 类 中的静态方法cn.com.fishin.tuz.helper.FTPHelper
-
连接到 FTP 服务器
返回一个 FTPClient 对象
Connect to FTP server
Return a connection to FTP server
- unLoad(Loadable) - 类 中的静态方法cn.com.fishin.tuz.core.Tuz
-
卸载一个资源文件
UnLoad a resource
- unLoad(String) - 类 中的静态方法cn.com.fishin.tuz.core.Tuz
-
卸载一个命名空间
UnLoad a namespace
- unUse(String, String) - 类 中的静态方法cn.com.fishin.tuz.core.Tuz
-
移除指定的 namespace 的资源值
Remove the value of the namespace's key
- upload(FTPUploadFile, String) - 类 中的静态方法cn.com.fishin.tuz.helper.FTPHelper
-
上传一个文件到 FTP 服务器
注意:
这个参数包含很多要被上传文件的属性以及 FTP 服务器的属性
Upload a file to FTP server
Notice:
This argument "file" has many attributes about the file
to be uploaded and info of FTP server
- uploadAscii(FTPUploadFile, String) - 类 中的静态方法cn.com.fishin.tuz.helper.FTPHelper
-
上传一个文本文件到 FTP 服务器
注意:
这个参数包含很多要被上传文件的属性以及 FTP 服务器的属性
Upload a text file to FTP server
Notice:
This argument "file" has many attributes about the file
to be uploaded and info of FTP server
- uploadBinary(FTPUploadFile, String) - 类 中的静态方法cn.com.fishin.tuz.helper.FTPHelper
-
上传一个二进制文件到 FTP 服务器
注意:
这个参数包含很多要被上传文件的属性以及 FTP 服务器的属性
Upload a binary file to FTP server
Notice:
This argument "file" has many attributes about the file
to be uploaded and info of FTP server
- uploadBinaryToServer(LoginInfo, String, String, InputStream) - 类 中的静态方法cn.com.fishin.tuz.plugin.NetPlugin
-
上传一个二进制文件到 FTP 服务器
注意:
controlEncoding 是网络通信使用的编码,是内部赋值的,外界不需要知道,它的默认值是在 TuzConfig 中
Upload a file to FTP server
Notice:
controlEncoding is used to net transport, default value is in TuzConfig
- uploadBinaryToServer(String, String, InputStream) - 类 中的静态方法cn.com.fishin.tuz.plugin.NetPlugin
-
上传一个二进制文件到 FTP 服务器
注意:
controlEncoding 是网络通信使用的编码,是内部赋值的,外界不需要知道,它的默认值是在 TuzConfig 中
Upload a file to FTP server
Notice:
controlEncoding is used to net transport, default value is in TuzConfig
- uploadTextToServer(LoginInfo, String, String, InputStream, Charset) - 类 中的静态方法cn.com.fishin.tuz.plugin.NetPlugin
-
上传一个文本文件到 FTP 服务器
注意:
由于文本文件可能有编码问题,所以这里多一个文本字符集的参数,
controlEncoding 是网络通信使用的编码,是内部赋值的,外界不需要知道,它的默认值是在 TuzConfig 中
Upload a file to FTP server
Notice:
You should appointed the encoding of text file to avoid encoding problems.
- uploadTextToServer(LoginInfo, String, String, InputStream) - 类 中的静态方法cn.com.fishin.tuz.plugin.NetPlugin
-
上传一个文本文件到 FTP 服务器
注意:
由于文本文件可能有编码问题,这里使用默认配置中的编码来解码,具体请看下面的 @see
controlEncoding 是网络通信使用的编码,是内部赋值的,外界不需要知道,它的默认值是在 TuzConfig 中
Upload a file to FTP server
Notice:
This method use default encoding to decode this text file,
controlEncoding is used to net transport, default value is in TuzConfig
- uploadToServer(FTPUploadFile) - 类 中的静态方法cn.com.fishin.tuz.plugin.NetPlugin
-
上传一个文件到 FTP 服务器
注意:
这个参数包含很多要被上传文件的属性以及 FTP 服务器的属性,
controlEncoding 是网络通信使用的编码,是内部赋值的,外界不需要知道,它的默认值是在 TuzConfig 中
Upload a file to FTP server
Notice:
This argument "file" has many attributes about the file
to be uploaded and info of FTP server.
- use(String, String) - 类 中的静态方法cn.com.fishin.tuz.core.Tuz
-
获取指定 namespace 的资源值
Fetch the value of the namespace's key
- use(String) - 类 中的静态方法cn.com.fishin.tuz.core.Tuz
-
获取指定 key 的属性值
强烈注意:
如果不指定命名空间,当多个配置文件中的 key 值一样的时候,
这个方法无法保证返回你需要的那个 key 值对应的 value!!
- useGracefully(String, String, String) - 类 中的静态方法cn.com.fishin.tuz.core.Tuz
-
获取指定 key 的属性值
Fetch the value of the key
- useGracefully(String, String) - 类 中的静态方法cn.com.fishin.tuz.core.Tuz
-
获取指定 key 的属性值
强烈注意:
如果不指定命名空间,当多个配置文件中的 key 值一样的时候,
这个方法无法保证返回你需要的那个 key 值对应的 value!!
- useInstance(Class<T>, boolean) - 类 中的静态方法cn.com.fishin.tuz.plugin.DiPlugin
-
得到类实例
这里会根据 classType 的 getSimpleName() 去获取 key,并且利用反射生成实例对象
Get class instance
Use reflect to instance a new object with given classType's simpleName
- useInstance(Class<T>) - 类 中的静态方法cn.com.fishin.tuz.plugin.DiPlugin
-
得到类实例
这里会根据 classType 的 getSimpleName() 去获取 key,并且利用反射生成实例对象
注意这里的实例模式是根据 Tuz.getConfig().isSingleton() 中的设置来决定的
Get class instance
Use reflect to instance a new object with given classType's simpleName
Notice that the mode creates the instance depends on Tuz.getConfig().isSingleton()
- useInstance(String, Class<T>, boolean) - 类 中的静态方法cn.com.fishin.tuz.plugin.DiPlugin
-
得到类实例
这里会根据 key 值获取 value,并且利用反射生成实例对象
Get class instance
Use reflect to instance a new object with given value of key
- useInstance(String, Class<T>) - 类 中的静态方法cn.com.fishin.tuz.plugin.DiPlugin
-
得到类实例
这里会根据 key 值获取 value,并且利用反射生成实例对象
注意这里的实例模式是根据 Tuz.getConfig().isSingleton() 中的设置来决定的
Get class instance
Use reflect to instance a new object with given value of key
Notice that the mode creates the instance depends on Tuz.getConfig().isSingleton()
- useInstance(String, String, Class<T>, boolean) - 类 中的静态方法cn.com.fishin.tuz.plugin.DiPlugin
-
得到类实例
这里会根据 key 值获取 value,并且利用反射生成实例对象
Get class instance
Use reflect to instance a new object with given value of key
- useInstance(String, String, Class<T>) - 类 中的静态方法cn.com.fishin.tuz.plugin.DiPlugin
-
得到类实例
这里会根据 key 值获取 value,并且利用反射生成实例对象
注意这里的实例模式是根据 Tuz.getConfig().isSingleton() 中的设置来决定的
Get class instance
Use reflect to instance a new object with given value of key
Notice that the mode creates the instance depends on Tuz.getConfig().isSingleton()
- useInstance(Class<T>, boolean, Interceptor[]) - 类 中的静态方法cn.com.fishin.tuz.plugin.ProxyPlugin
-
得到类被拦截器代理之后的实例
这里会根据 classType 的 getSimpleName() 去获取 key,并且利用反射生成实例对象
Get class instance after intercepting
Use reflect to instance a new object with given classType's simpleName
- useInstance(Class<T>, Interceptor[]) - 类 中的静态方法cn.com.fishin.tuz.plugin.ProxyPlugin
-
得到类被拦截器代理之后的实例
这里会根据 classType 的 getSimpleName() 去获取 key,并且利用反射生成实例对象
注意这里的实例模式是根据 Tuz.getConfig().isSingleton() 中的设置来决定的
Get class instance after intercepting
Use reflect to instance a new object with given classType's simpleName
Notice that the mode creates the instance depends on Tuz.getConfig().isSingleton()
- useInstance(String, Class<T>, boolean, Interceptor[]) - 类 中的静态方法cn.com.fishin.tuz.plugin.ProxyPlugin
-
得到类被拦截器代理之后的实例
这里会根据 key 值获取 value,并且利用反射生成实例对象
Get class instance after intercepting
Use reflect to instance a new object with given value of key
- useInstance(String, Class<T>, Interceptor[]) - 类 中的静态方法cn.com.fishin.tuz.plugin.ProxyPlugin
-
得到类被拦截器代理之后的实例
这里会根据 key 值获取 value,并且利用反射生成实例对象
注意这里的实例模式是根据 Tuz.getConfig().isSingleton() 中的设置来决定的
Get class instance after intercepting
Use reflect to instance a new object with given value of key
Notice that the mode creates the instance depends on Tuz.getConfig().isSingleton()
- useInstance(String, String, Class<T>, boolean, Interceptor[]) - 类 中的静态方法cn.com.fishin.tuz.plugin.ProxyPlugin
-
得到类被拦截器代理之后的实例
这里会根据 key 值获取 value,并且利用反射生成实例对象
Get class instance after intercepting
Use reflect to instance a new object with given value of key
- useInstance(String, String, Class<T>, Interceptor[]) - 类 中的静态方法cn.com.fishin.tuz.plugin.ProxyPlugin
-
得到类被拦截器代理之后的实例
这里会根据 key 值获取 value,并且利用反射生成实例对象
注意这里的实例模式是根据 Tuz.getConfig().isSingleton() 中的设置来决定的
Get class instance after intercepting
Use reflect to instance a new object with given value of key
Notice that the mode creates the instance depends on Tuz.getConfig().isSingleton()