类 JsonViewUtils
java.lang.Object
cn.dinodev.spring.commons.json.JsonViewUtils
- 作者:
- Cody Lu
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Class<?>[]findViews(AnnotatedElement element) 获取方法的视图static boolean判断是否在指定的视图中static boolean判断是否在指定的视图中static booleanisInView(AnnotatedElement element, Class<?> activeView) 判断Method, Field, Constructor, Parameter, Class等是否在指定的视图中static booleanisInView(AnnotatedElement element, Class<?> activeView, boolean defaultViewInclusion) 判断Method, Field, Constructor, Parameter, Class等是否在指定的视图中
-
构造器详细资料
-
JsonViewUtils
public JsonViewUtils()
-
-
方法详细资料
-
isInView
判断是否在指定的视图中- 参数:
activeView- 视图views- 视图集合- 返回:
- true:在视图集合中,或者activeView==null, 或者views为空;false:不在视图集合中
-
isInView
判断是否在指定的视图中- 参数:
activeView- 视图views- 视图集合defaultViewInclusion- 是否默认包含默认视图- 返回:
- true:在视图集合中,或者activeView==null, 或者(views为空&&defaultViewInclusion==true);false:不在视图集合中
-
findViews
获取方法的视图- 参数:
element- Method, Field, Constructor, Parameter, Class等- 返回:
- 视图,如果没有视图或者方法为null,则返回null
-
isInView
判断Method, Field, Constructor, Parameter, Class等是否在指定的视图中- 参数:
element- Method, Field, Constructor, Parameter, Class等activeView- 视图
-
isInView
public static boolean isInView(AnnotatedElement element, Class<?> activeView, boolean defaultViewInclusion) 判断Method, Field, Constructor, Parameter, Class等是否在指定的视图中- 参数:
element- Method, Field, Constructor, Parameter, Class等activeView- 视图defaultViewInclusion- 是否默认包含默认视图- 返回:
-