public final class ASMCreatorParameterNameResolver extends Object implements PropertyNameResolver
new Genson.Builder().setWithDebugInfoPropertyNameResolver(true).create();If you enabled this feature, when a class with no debug symbols is encountered no exception will be thrown, if you want you can force exceptions with
new Genson.Builder().setWithDebugInfoPropertyNameResolver(true) .setThrowExceptionIfNoDebugInfo(true).create();
PropertyNameResolver.AnnotationPropertyNameResolver, PropertyNameResolver.CompositePropertyNameResolver, PropertyNameResolver.ConventionalBeanPropertyNameResolver
Constructor and Description |
---|
ASMCreatorParameterNameResolver(boolean doThrowException) |
Modifier and Type | Method and Description |
---|---|
protected void |
read(Class<?> ofClass) |
String |
resolve(Field fromField)
Resolve the property name from this field.
|
String |
resolve(int parameterIdx,
Constructor<?> fromConstructor)
Resolve the parameter name on position parameterIdx in the constructor fromConstructor.
|
String |
resolve(int parameterIdx,
Method fromMethod)
Resolve the name of the parameter with parameterIdx as index in fromMethod method.
|
String |
resolve(Method fromMethod)
Resolve the property name from this method.
|
public ASMCreatorParameterNameResolver(boolean doThrowException)
protected void read(Class<?> ofClass)
public String resolve(int parameterIdx, Constructor<?> fromConstructor)
PropertyNameResolver
resolve
in interface PropertyNameResolver
public String resolve(Field fromField)
PropertyNameResolver
resolve
in interface PropertyNameResolver
fromField
- - the field to use for name resolution.public String resolve(Method fromMethod)
PropertyNameResolver
resolve
in interface PropertyNameResolver
fromMethod
- - the method to be used for name resolution.public String resolve(int parameterIdx, Method fromMethod)
PropertyNameResolver
resolve
in interface PropertyNameResolver
Copyright © 2019. All rights reserved.