public class RuntimeNativeMetadata
extends java.lang.Object
META-INF/native-image/xxx/xxx-config.json
文件,请注意,这个类是对 graalvm native 的不完整实现,需要时再补充构造器和说明 |
---|
RuntimeNativeMetadata() |
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getApplicationClassName() |
java.util.Set<java.lang.String> |
getArgs() |
java.util.List<ResourceHint> |
getExcludes() |
java.util.List<ResourceHint> |
getIncludes() |
java.util.Map<java.lang.String,JdkProxyHint> |
getJdkProxys() |
java.util.Map<java.lang.String,SerializationHint> |
getLambdaSerializations() |
java.util.Map<java.lang.String,ReflectionHints> |
getReflection() |
java.util.Map<java.lang.String,SerializationHint> |
getSerializations() |
RuntimeNativeMetadata |
registerAllDeclaredMethod(java.lang.Class<?> clazz,
ExecutableMode mode)
注册类上所有的方法
|
RuntimeNativeMetadata |
registerArg(java.lang.String... args)
注册参数
|
RuntimeNativeMetadata |
registerConstructor(java.lang.reflect.Constructor<?> constructor,
ExecutableMode mode) |
RuntimeNativeMetadata |
registerDefaultConstructor(java.lang.Class<?> clazz)
注册默认构造方法,如果不存在则不注册
|
RuntimeNativeMetadata |
registerDefaultConstructor(java.lang.String className)
注册默认构造方法,如果类不存在或不存在默认构造 则不注册
|
RuntimeNativeMetadata |
registerField(java.lang.reflect.Field field) |
RuntimeNativeMetadata |
registerJdkProxy(java.lang.Class<?> type)
注册 jdk 代理接口
|
RuntimeNativeMetadata |
registerJdkProxy(java.lang.Class<?> type,
java.lang.String reachableType)
注册 jdk 代理接口
|
RuntimeNativeMetadata |
registerLambdaSerialization(java.lang.Class<?> type)
注册Lambda序列化
|
RuntimeNativeMetadata |
registerMethod(java.lang.reflect.Method method,
ExecutableMode mode) |
RuntimeNativeMetadata |
registerReflection(java.lang.Class<?> type,
java.util.function.Consumer<ReflectionHints> typeHint)
注册反射相关
|
RuntimeNativeMetadata |
registerReflection(java.lang.Class<?> type,
MemberCategory... memberCategories)
注册反射相关
|
RuntimeNativeMetadata |
registerReflection(java.lang.String className,
java.util.function.Consumer<ReflectionHints> typeHint)
注册反射相关
|
RuntimeNativeMetadata |
registerReflection(java.lang.String className,
MemberCategory... memberCategories)
注册反射相关
|
RuntimeNativeMetadata |
registerResourceExclude(java.lang.String pattern)
注册排除的资源
|
RuntimeNativeMetadata |
registerResourceExclude(java.lang.String pattern,
java.lang.String reachableType)
注册排除的资源
|
RuntimeNativeMetadata |
registerResourceInclude(java.lang.String pattern)
注册包含的资源
|
RuntimeNativeMetadata |
registerResourceInclude(java.lang.String pattern,
java.lang.String reachableType)
注册包含的资源
|
RuntimeNativeMetadata |
registerSerialization(java.lang.Class<?> type)
注册Java序列化
|
RuntimeNativeMetadata |
registerSerialization(java.lang.Class<?> type,
java.lang.String reachableType)
注册Java序列化
|
RuntimeNativeMetadata |
registerSerialization(java.lang.Package basePackage)
注册Java序列化
|
RuntimeNativeMetadata |
registerSerialization(java.lang.String name)
注册Java序列化
|
void |
setApplicationClassName(java.lang.String applicationClassName) |
java.lang.String |
toJdkProxyJson() |
java.lang.String |
toReflectionJson()
生成 reflect-config.json
|
java.lang.String |
toResourcesJson()
生成 resource-config.json
|
java.lang.String |
toSerializationJson()
生成 serialization-config.json
|
public RuntimeNativeMetadata registerArg(java.lang.String... args)
args
- 参数this
public RuntimeNativeMetadata registerJdkProxy(java.lang.Class<?> type)
public RuntimeNativeMetadata registerJdkProxy(java.lang.Class<?> type, java.lang.String reachableType)
public RuntimeNativeMetadata registerReflection(java.lang.String className, java.util.function.Consumer<ReflectionHints> typeHint)
className
- 全类名typeHint
- 为该类型添加更多的反射信息this
public RuntimeNativeMetadata registerReflection(java.lang.Class<?> type, java.util.function.Consumer<ReflectionHints> typeHint)
type
- 类型typeHint
- 为该类型添加更多的反射信息this
public RuntimeNativeMetadata registerReflection(java.lang.Class<?> type, MemberCategory... memberCategories)
type
- 类型memberCategories
- 成员类别this
public RuntimeNativeMetadata registerReflection(java.lang.String className, MemberCategory... memberCategories)
className
- 全类名memberCategories
- 成员类别this
public RuntimeNativeMetadata registerField(java.lang.reflect.Field field)
public RuntimeNativeMetadata registerConstructor(java.lang.reflect.Constructor<?> constructor, ExecutableMode mode)
public RuntimeNativeMetadata registerMethod(java.lang.reflect.Method method, ExecutableMode mode)
public RuntimeNativeMetadata registerAllDeclaredMethod(java.lang.Class<?> clazz, ExecutableMode mode)
public RuntimeNativeMetadata registerDefaultConstructor(java.lang.Class<?> clazz)
public RuntimeNativeMetadata registerDefaultConstructor(java.lang.String className)
public RuntimeNativeMetadata registerResourceInclude(java.lang.String pattern)
pattern
- 正则表达式this
public RuntimeNativeMetadata registerResourceInclude(java.lang.String pattern, java.lang.String reachableType)
pattern
- 正则表达式reachableType
- condition classthis
public RuntimeNativeMetadata registerResourceExclude(java.lang.String pattern)
pattern
- 正则表达式this
public RuntimeNativeMetadata registerResourceExclude(java.lang.String pattern, java.lang.String reachableType)
pattern
- 正则表达式reachableType
- condition classthis
public RuntimeNativeMetadata registerSerialization(java.lang.Package basePackage)
basePackage
- 类型基础包this
public RuntimeNativeMetadata registerSerialization(java.lang.Class<?> type)
type
- 类型this
public RuntimeNativeMetadata registerSerialization(java.lang.String name)
name
- 全类名this
public RuntimeNativeMetadata registerSerialization(java.lang.Class<?> type, java.lang.String reachableType)
type
- 类型reachableType
- condition classthis
public RuntimeNativeMetadata registerLambdaSerialization(java.lang.Class<?> type)
public java.lang.String toReflectionJson()
public java.lang.String toResourcesJson()
public java.lang.String toSerializationJson()
public java.lang.String toJdkProxyJson()
public java.util.Map<java.lang.String,ReflectionHints> getReflection()
public java.util.Set<java.lang.String> getArgs()
public java.util.List<ResourceHint> getIncludes()
public java.util.List<ResourceHint> getExcludes()
public java.util.Map<java.lang.String,SerializationHint> getSerializations()
public java.util.Map<java.lang.String,SerializationHint> getLambdaSerializations()
public java.util.Map<java.lang.String,JdkProxyHint> getJdkProxys()
public java.lang.String getApplicationClassName()
public void setApplicationClassName(java.lang.String applicationClassName)