com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.fixAccess()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.fixAccess()方法的一些代码示例,展示了AnnotatedConstructor.fixAccess()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AnnotatedConstructor.fixAccess()方法的具体详情如下:
包路径:com.fasterxml.jackson.databind.introspect.AnnotatedConstructor
类名称:AnnotatedConstructor
方法名:fixAccess

AnnotatedConstructor.fixAccess介绍

暂无

代码示例

代码示例来源:origin: redisson/redisson

@Override
public Object instantiateBean(boolean fixAccess) {
  AnnotatedConstructor ac = _classInfo.getDefaultConstructor();
  if (ac == null) {
    return null;
  }
  if (fixAccess) {
    ac.fixAccess(_config.isEnabled(MapperFeature.OVERRIDE_PUBLIC_ACCESS_MODIFIERS));
  }
  try {
    return ac.getAnnotated().newInstance();
  } catch (Exception e) {
    Throwable t = e;
    while (t.getCause() != null) {
      t = t.getCause();
    }
    ClassUtil.throwIfError(t);
    ClassUtil.throwIfRTE(t);
    throw new IllegalArgumentException("Failed to instantiate bean of type "
        +_classInfo.getAnnotated().getName()+": ("+t.getClass().getName()+") "
        +ClassUtil.exceptionMessage(t), t);
  }
}

代码示例来源:origin: com.fasterxml.jackson.core/com.springsource.com.fasterxml.jackson.core.jackson-databind

@Override
public Object instantiateBean(boolean fixAccess)
{
  AnnotatedConstructor ac = _classInfo.getDefaultConstructor();
  if (ac == null) {
    return null;
  }
  if (fixAccess) {
    ac.fixAccess();
  }
  try {
    return ac.getAnnotated().newInstance();
  } catch (Exception e) {
    Throwable t = e;
    while (t.getCause() != null) {
      t = t.getCause();
    }
    if (t instanceof Error) throw (Error) t;
    if (t instanceof RuntimeException) throw (RuntimeException) t;
    throw new IllegalArgumentException("Failed to instantiate bean of type "+_classInfo.getAnnotated().getName()+": ("+t.getClass().getName()+") "+t.getMessage(), t);
  }
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public Object instantiateBean(boolean fixAccess)
{
  AnnotatedConstructor ac = _classInfo.getDefaultConstructor();
  if (ac == null) {
    return null;
  }
  if (fixAccess) {
    ac.fixAccess();
  }
  try {
    return ac.getAnnotated().newInstance();
  } catch (Exception e) {
    Throwable t = e;
    while (t.getCause() != null) {
      t = t.getCause();
    }
    if (t instanceof Error) throw (Error) t;
    if (t instanceof RuntimeException) throw (RuntimeException) t;
    throw new IllegalArgumentException("Failed to instantiate bean of type "+_classInfo.getAnnotated().getName()+": ("+t.getClass().getName()+") "+t.getMessage(), t);
  }
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

@Override
public Object instantiateBean(boolean fixAccess)
{
  AnnotatedConstructor ac = _classInfo.getDefaultConstructor();
  if (ac == null) {
    return null;
  }
  if (fixAccess) {
    ac.fixAccess();
  }
  try {
    return ac.getAnnotated().newInstance();
  } catch (Exception e) {
    Throwable t = e;
    while (t.getCause() != null) {
      t = t.getCause();
    }
    if (t instanceof Error) throw (Error) t;
    if (t instanceof RuntimeException) throw (RuntimeException) t;
    throw new IllegalArgumentException("Failed to instantiate bean of type "+_classInfo.getAnnotated().getName()+": ("+t.getClass().getName()+") "+t.getMessage(), t);
  }
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

@Override
public Object instantiateBean(boolean fixAccess)
{
  AnnotatedConstructor ac = _classInfo.getDefaultConstructor();
  if (ac == null) {
    return null;
  }
  if (fixAccess) {
    ac.fixAccess();
  }
  try {
    return ac.getAnnotated().newInstance();
  } catch (Exception e) {
    Throwable t = e;
    while (t.getCause() != null) {
      t = t.getCause();
    }
    if (t instanceof Error) throw (Error) t;
    if (t instanceof RuntimeException) throw (RuntimeException) t;
    throw new IllegalArgumentException("Failed to instantiate bean of type "+_classInfo.getAnnotated().getName()+": ("+t.getClass().getName()+") "+t.getMessage(), t);
  }
}

代码示例来源:origin: Nextdoor/bender

@Override
public Object instantiateBean(boolean fixAccess) {
  AnnotatedConstructor ac = _classInfo.getDefaultConstructor();
  if (ac == null) {
    return null;
  }
  if (fixAccess) {
    ac.fixAccess(_config.isEnabled(MapperFeature.OVERRIDE_PUBLIC_ACCESS_MODIFIERS));
  }
  try {
    return ac.getAnnotated().newInstance();
  } catch (Exception e) {
    Throwable t = e;
    while (t.getCause() != null) {
      t = t.getCause();
    }
    if (t instanceof Error) throw (Error) t;
    if (t instanceof RuntimeException) throw (RuntimeException) t;
    throw new IllegalArgumentException("Failed to instantiate bean of type "+_classInfo.getAnnotated().getName()+": ("+t.getClass().getName()+") "+t.getMessage(), t);
  }
}

代码示例来源:origin: com.jwebmp.jackson.core/jackson-databind

@Override
public Object instantiateBean(boolean fixAccess) {
  AnnotatedConstructor ac = _classInfo.getDefaultConstructor();
  if (ac == null) {
    return null;
  }
  if (fixAccess) {
    ac.fixAccess(_config.isEnabled(MapperFeature.OVERRIDE_PUBLIC_ACCESS_MODIFIERS));
  }
  try {
    return ac.getAnnotated().newInstance();
  } catch (Exception e) {
    Throwable t = e;
    while (t.getCause() != null) {
      t = t.getCause();
    }
    ClassUtil.throwIfError(t);
    ClassUtil.throwIfRTE(t);
    throw new IllegalArgumentException("Failed to instantiate bean of type "
        +_classInfo.getAnnotated().getName()+": ("+t.getClass().getName()+") "
        +ClassUtil.exceptionMessage(t), t);
  }
}

相关文章