程序包 org.xmeta
接口 Category
- 所有已知实现类:
CachedCategory,ClassCategory,FileCategory,JarCategory,JdbcCategory,RedisCategory,TransientCategory
public interface Category
目录是包含在模型管理者下的,用来对模型管理者中的模型进行分类。
- 作者:
- zyx
-
方法概要
修饰符和类型方法说明getCategory(String name) 通过名称返回指定的下级目录。获取下一级的目录的列表。返回Category对应的ClassLoader。返回文件所在的位置。getName()返回当前目录的名称。返回上级目录。返回目录的简写。通过模型的名称获得当前目录下的模型。返回当前目录下的所有模型的索引列表,不包含子目录。getThingIndexs(String descriptor) 根据描述返回模型索引列表。返回此目录所属的模型管理者。获得当前目录下的模型列表。返回指定模型的列表。iterator(boolean includeChildCategory) 遍历当前目录下的所有模型。通过指定的描述者名称遍历当前目录下的所有模型。voidrefresh()刷新。voidrefresh(boolean includeChild) 刷新。voidsetClassLoader(ThingClassLoader classLoader) 设置当前Category的类加载器。
-
方法详细资料
-
getCategory
通过名称返回指定的下级目录。- 参数:
name- 下级目录的名称- 返回:
- 下级目录,如果不存在返回null
-
getCategorys
获取下一级的目录的列表。- 返回:
- 下一级目录的列表
-
getName
String getName()返回当前目录的名称。- 返回:
- 目录的名称
-
getSimpleName
String getSimpleName()返回目录的简写。- 返回:
- 目录名
-
getFilePath
String getFilePath()返回文件所在的位置。- 返回:
- 文件路径
-
getParent
Category getParent()返回上级目录。- 返回:
- 上级目录,如果不存在返回null
-
refresh
void refresh()刷新。 -
refresh
void refresh(boolean includeChild) 刷新。- 参数:
includeChild- 是否包含子目录
-
getThing
通过模型的名称获得当前目录下的模型。- 参数:
name- 模型名称- 返回:
- 模型,如果不存在返回null
-
getThingManager
ThingManager getThingManager()返回此目录所属的模型管理者。- 返回:
- 模型管理者
-
getThingIndexs
List<ThingIndex> getThingIndexs()返回当前目录下的所有模型的索引列表,不包含子目录。- 返回:
- 模型的索引列表
-
getThingIndexs
根据描述返回模型索引列表。- 参数:
descriptor- 描述者- 返回:
- 模型索引列表
-
getThings
获得当前目录下的模型列表。 取具体模型是请用World,World负责缓存。- 返回:
- 模型列表
-
getThings
返回指定模型的列表。 取具体模型是请用World,World负责缓存。- 参数:
descriptor- 描述者- 返回:
- 模型列表
-
iterator
遍历当前目录下的所有模型。 取具体模型是请用World,World负责缓存。- 参数:
includeChildCategory- 是否包含子目录- 返回:
- 模型遍历器
-
iterator
通过指定的描述者名称遍历当前目录下的所有模型。 取具体模型是请用World,World负责缓存。- 参数:
descriptorPath- 描述者的路径includeChildCategory- 是否包含子目录- 返回:
- 模型遍历器
-
getClassLoader
ThingClassLoader getClassLoader()返回Category对应的ClassLoader。如果当前classLoader为null一般使用父级的classLoader。- 返回:
-
setClassLoader
设置当前Category的类加载器。- 参数:
classLoader-
-