Class SafeConstructor.DefaultSafeConstructor
java.lang.Object
cloud.opencode.base.yml.security.SafeConstructor.DefaultSafeConstructor
- All Implemented Interfaces:
SafeConstructor
- Enclosing interface:
SafeConstructor
public static final class SafeConstructor.DefaultSafeConstructor
extends Object
implements SafeConstructor
Default Safe Constructor Implementation
默认安全构造器实现
- Since:
- JDK 25, opencode-base-yml V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from interface SafeConstructor
SafeConstructor.Builder, SafeConstructor.DefaultSafeConstructor -
Field Summary
Fields inherited from interface SafeConstructor
BASIC_SAFE_TYPES -
Method Summary
Modifier and TypeMethodDescriptionGets the set of allowed packages.Gets the set of allowed types.booleanisSafeType(Class<?> type) Checks if a type is safe for construction.booleanisSafeType(String typeName) Checks if a type name is safe for construction.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SafeConstructor
validateType, validateType
-
Method Details
-
isSafeType
Description copied from interface:SafeConstructorChecks if a type is safe for construction. 检查类型是否可以安全构造。- Specified by:
isSafeTypein interfaceSafeConstructor- Parameters:
type- the type to check | 要检查的类型- Returns:
- true if safe | 如果安全则返回 true
-
isSafeType
Description copied from interface:SafeConstructorChecks if a type name is safe for construction. 检查类型名称是否可以安全构造。- Specified by:
isSafeTypein interfaceSafeConstructor- Parameters:
typeName- the type name | 类型名称- Returns:
- true if safe | 如果安全则返回 true
-
getAllowedTypes
Description copied from interface:SafeConstructorGets the set of allowed types. 获取允许的类型集合。- Specified by:
getAllowedTypesin interfaceSafeConstructor- Returns:
- allowed types | 允许的类型
-
getAllowedPackages
Description copied from interface:SafeConstructorGets the set of allowed packages. 获取允许的包名集合。- Specified by:
getAllowedPackagesin interfaceSafeConstructor- Returns:
- allowed packages | 允许的包名
-