本文整理了Java中com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.getParameter()
方法的一些代码示例,展示了AnnotatedConstructor.getParameter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AnnotatedConstructor.getParameter()
方法的具体详情如下:
包路径:com.fasterxml.jackson.databind.introspect.AnnotatedConstructor
类名称:AnnotatedConstructor
方法名:getParameter
暂无
代码示例来源:origin: redisson/redisson
/**
* Method for collecting basic information on constructor(s) found
*/
protected void _addCreators(Map<String, POJOPropertyBuilder> props)
{
// can be null if annotation processing is disabled...
if (!_useAnnotations) {
return;
}
for (AnnotatedConstructor ctor : _classDef.getConstructors()) {
if (_creatorProperties == null) {
_creatorProperties = new LinkedList<POJOPropertyBuilder>();
}
for (int i = 0, len = ctor.getParameterCount(); i < len; ++i) {
_addCreatorParam(props, ctor.getParameter(i));
}
}
for (AnnotatedMethod factory : _classDef.getFactoryMethods()) {
if (_creatorProperties == null) {
_creatorProperties = new LinkedList<POJOPropertyBuilder>();
}
for (int i = 0, len = factory.getParameterCount(); i < len; ++i) {
_addCreatorParam(props, factory.getParameter(i));
}
}
}
代码示例来源:origin: com.fasterxml.jackson.core/com.springsource.com.fasterxml.jackson.core.jackson-databind
AnnotatedParameter param = ctor.getParameter(0);
String name = intr.findDeserializationName(param);
Object injectId = intr.findInjectableValueId(param);
代码示例来源:origin: io.norberg/auto-matter-jackson
@Override
public boolean hasCreatorAnnotation(final Annotated a) {
if (!(a instanceof AnnotatedConstructor)) {
return false;
}
final AnnotatedConstructor ctor = (AnnotatedConstructor) a;
if (ctor.getParameterCount() == 0) {
return true;
}
final AutoMatter.Field field = ctor.getParameter(0).getAnnotation(AutoMatter.Field.class);
return field != null;
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
AnnotatedParameter param = ctor.getParameter(0);
PropertyName pn = (param == null) ? null : intr.findNameForDeserialization(param);
String name = (pn == null) ? null : pn.getSimpleName();
代码示例来源:origin: danielnorberg/auto-matter
@Override
public boolean hasCreatorAnnotation(final Annotated a) {
if (!(a instanceof AnnotatedConstructor)) {
return false;
}
final AnnotatedConstructor ctor = (AnnotatedConstructor) a;
if (ctor.getParameterCount() == 0) {
return true;
}
final AutoMatter.Field field = ctor.getParameter(0).getAnnotation(AutoMatter.Field.class);
return field != null;
}
}
代码示例来源:origin: xebia/jackson-lombok
private void addJacksonAnnotationsToContructorParameters(AnnotatedConstructor annotatedConstructor) {
ConstructorProperties properties = getConstructorPropertiesAnnotation(annotatedConstructor);
for (int i = 0; i < annotatedConstructor.getParameterCount(); i++) {
String name = properties.value()[i];
AnnotatedParameter parameter = annotatedConstructor.getParameter(i);
Field field = null;
try {
field = annotatedConstructor.getDeclaringClass().getDeclaredField(name);
} catch (NoSuchFieldException ignored) {
}
addJacksonAnnotationsToConstructorParameter(field, parameter, name);
}
}
代码示例来源:origin: io.paradoxical/jackson-lombok
private void addJacksonAnnotationsToContructorParameters(AnnotatedConstructor annotatedConstructor) {
ConstructorProperties properties = getConstructorPropertiesAnnotation(annotatedConstructor);
for (int i = 0; i < annotatedConstructor.getParameterCount(); i++) {
String name = properties.value()[i];
AnnotatedParameter parameter = annotatedConstructor.getParameter(i);
Field field = null;
try {
field = annotatedConstructor.getDeclaringClass().getDeclaredField(name);
}
catch (NoSuchFieldException ignored) {
}
addJacksonAnnotationsToConstructorParameter(field, parameter, name);
}
}
代码示例来源:origin: Nextdoor/bender
/**
* Method for collecting basic information on constructor(s) found
*/
protected void _addCreators(Map<String, POJOPropertyBuilder> props)
{
// can be null if annotation processing is disabled...
if (_annotationIntrospector == null) {
return;
}
for (AnnotatedConstructor ctor : _classDef.getConstructors()) {
if (_creatorProperties == null) {
_creatorProperties = new LinkedList<POJOPropertyBuilder>();
}
for (int i = 0, len = ctor.getParameterCount(); i < len; ++i) {
_addCreatorParam(props, ctor.getParameter(i));
}
}
for (AnnotatedMethod factory : _classDef.getStaticMethods()) {
if (_creatorProperties == null) {
_creatorProperties = new LinkedList<POJOPropertyBuilder>();
}
for (int i = 0, len = factory.getParameterCount(); i < len; ++i) {
_addCreatorParam(props, factory.getParameter(i));
}
}
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
/**
* Method for collecting basic information on constructor(s) found
*/
protected void _addCreators()
{
// can be null if annotation processing is disabled...
if (_annotationIntrospector != null) {
for (AnnotatedConstructor ctor : _classDef.getConstructors()) {
if (_creatorProperties == null) {
_creatorProperties = new LinkedList<POJOPropertyBuilder>();
}
for (int i = 0, len = ctor.getParameterCount(); i < len; ++i) {
_addCreatorParam(ctor.getParameter(i));
}
}
for (AnnotatedMethod factory : _classDef.getStaticMethods()) {
if (_creatorProperties == null) {
_creatorProperties = new LinkedList<POJOPropertyBuilder>();
}
for (int i = 0, len = factory.getParameterCount(); i < len; ++i) {
_addCreatorParam(factory.getParameter(i));
}
}
}
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Method for collecting basic information on constructor(s) found
*/
protected void _addCreators()
{
// can be null if annotation processing is disabled...
if (_annotationIntrospector != null) {
for (AnnotatedConstructor ctor : _classDef.getConstructors()) {
if (_creatorProperties == null) {
_creatorProperties = new LinkedList<POJOPropertyBuilder>();
}
for (int i = 0, len = ctor.getParameterCount(); i < len; ++i) {
_addCreatorParam(ctor.getParameter(i));
}
}
for (AnnotatedMethod factory : _classDef.getStaticMethods()) {
if (_creatorProperties == null) {
_creatorProperties = new LinkedList<POJOPropertyBuilder>();
}
for (int i = 0, len = factory.getParameterCount(); i < len; ++i) {
_addCreatorParam(factory.getParameter(i));
}
}
}
}
代码示例来源:origin: com.jwebmp.jackson.core/jackson-databind
/**
* Method for collecting basic information on constructor(s) found
*/
protected void _addCreators(Map<String, POJOPropertyBuilder> props)
{
// can be null if annotation processing is disabled...
if (!_useAnnotations) {
return;
}
for (AnnotatedConstructor ctor : _classDef.getConstructors()) {
if (_creatorProperties == null) {
_creatorProperties = new LinkedList<POJOPropertyBuilder>();
}
for (int i = 0, len = ctor.getParameterCount(); i < len; ++i) {
_addCreatorParam(props, ctor.getParameter(i));
}
}
for (AnnotatedMethod factory : _classDef.getFactoryMethods()) {
if (_creatorProperties == null) {
_creatorProperties = new LinkedList<POJOPropertyBuilder>();
}
for (int i = 0, len = factory.getParameterCount(); i < len; ++i) {
_addCreatorParam(props, factory.getParameter(i));
}
}
}
代码示例来源:origin: stackoverflow.com
ac.getParameter(i).addOrOverride(jsonProperty);
代码示例来源:origin: com.fasterxml.jackson.core/com.springsource.com.fasterxml.jackson.core.jackson-databind
AnnotatedParameter param = ctor.getParameter(i);
String name = ai.findDeserializationName(param);
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
AnnotatedParameter param = ctor.getParameter(i);
PropertyName pn = ai.findNameForDeserialization(param);
String name = (pn == null) ? null : pn.getSimpleName();
代码示例来源:origin: com.fasterxml.jackson.core/com.springsource.com.fasterxml.jackson.core.jackson-databind
CreatorProperty[] properties = new CreatorProperty[argCount];
for (int i = 0; i < argCount; ++i) {
AnnotatedParameter param = ctor.getParameter(i);
String name = (param == null) ? null : intr.findDeserializationName(param);
Object injectId = intr.findInjectableValueId(param);
代码示例来源:origin: Nextdoor/bender
SettableBeanProperty[] properties = new SettableBeanProperty[argCount];
for (int i = 0; i < argCount; ++i) {
final AnnotatedParameter param = ctor.getParameter(i);
final PropertyName name = _findParamName(param, intr);
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
CreatorProperty[] properties = new CreatorProperty[argCount];
for (int i = 0; i < argCount; ++i) {
AnnotatedParameter param = ctor.getParameter(i);
PropertyName pn = (param == null) ? null : intr.findNameForDeserialization(param);
String name = (pn == null) ? null : pn.getSimpleName();
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
CreatorProperty[] properties = new CreatorProperty[1];
PropertyName name = (argDef == null) ? null : argDef.getFullName();
AnnotatedParameter arg = ctor.getParameter(0);
properties[0] = constructCreatorProperty(ctxt, beanDesc, name, 0, arg,
intr.findInjectableValueId(arg));
int injectCount = 0;
for (int i = 0; i < argCount; ++i) {
final AnnotatedParameter param = ctor.getParameter(i);
BeanPropertyDefinition propDef = (propDefs == null) ? null : propDefs[i];
Object injectId = intr.findInjectableValueId(param);
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
CreatorProperty[] properties = new CreatorProperty[1];
PropertyName name = (argDef == null) ? null : argDef.getFullName();
AnnotatedParameter arg = ctor.getParameter(0);
properties[0] = constructCreatorProperty(ctxt, beanDesc, name, 0, arg,
intr.findInjectableValueId(arg));
int injectCount = 0;
for (int i = 0; i < argCount; ++i) {
final AnnotatedParameter param = ctor.getParameter(i);
BeanPropertyDefinition propDef = (propDefs == null) ? null : propDefs[i];
Object injectId = intr.findInjectableValueId(param);
代码示例来源:origin: Nextdoor/bender
SettableBeanProperty[] properties = new SettableBeanProperty[1];
PropertyName name = (argDef == null) ? null : argDef.getFullName();
AnnotatedParameter arg = ctor.getParameter(0);
properties[0] = constructCreatorProperty(ctxt, beanDesc, name, 0, arg,
intr.findInjectableValueId(arg));
final AnnotatedParameter param = ctor.getParameter(i);
BeanPropertyDefinition propDef = (propDefs == null) ? null : propDefs[i];
Object injectId = intr.findInjectableValueId(param);
内容来源于网络,如有侵权,请联系作者删除!