当前位置: 首页>>代码示例>>Java>>正文


Java ObjectIdGenerator.getClass方法代码示例

本文整理汇总了Java中com.fasterxml.jackson.annotation.ObjectIdGenerator.getClass方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectIdGenerator.getClass方法的具体用法?Java ObjectIdGenerator.getClass怎么用?Java ObjectIdGenerator.getClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.fasterxml.jackson.annotation.ObjectIdGenerator的用法示例。


在下文中一共展示了ObjectIdGenerator.getClass方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: canUseFor

import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
/**
 * We must override this method, to prevent errors when scopes are the same,
 * but underlying class (on which to access property) is different.
 */
@Override
public boolean canUseFor(ObjectIdGenerator<?> gen) {
    if (gen.getClass() == getClass()) {
        PropertyBasedObjectIdGenerator other = (PropertyBasedObjectIdGenerator) gen;
        if (other.getScope() == _scope) {
            /* 26-Jul-2012, tatu: This is actually not enough, because the property
             *   accessor within BeanPropertyWriter won't work for other property fields
             *  (see [https://github.com/FasterXML/jackson-module-jaxb-annotations/issues/9]
             *  for details).
             *  So we need to verify that underlying property is actually the same.
             */
            return (other._property == _property);
        }
    }
    return false;
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:21,代码来源:PropertyBasedObjectIdGenerator.java

示例2: canUseFor

import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
public boolean canUseFor(ObjectIdGenerator<?> paramObjectIdGenerator)
{
  if (paramObjectIdGenerator.getClass() == getClass())
  {
    PropertyBasedObjectIdGenerator localPropertyBasedObjectIdGenerator = (PropertyBasedObjectIdGenerator)paramObjectIdGenerator;
    if (localPropertyBasedObjectIdGenerator.getScope() == this._scope)
      return localPropertyBasedObjectIdGenerator._property == this._property;
  }
  return false;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:11,代码来源:PropertyBasedObjectIdGenerator.java

示例3: canUseFor

import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
@Override
public boolean canUseFor(ObjectIdGenerator<?> gen) {
	return (gen.getClass() == getClass()) && (gen.getScope() == _scope);
}
 
开发者ID:kucera-jan-cz,项目名称:esBench,代码行数:5,代码来源:TokensIdGenerator.java

示例4: canUseFor

import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
@Override
public boolean canUseFor(ObjectIdGenerator<?> gen) {
    return (gen.getClass() == getClass()) && (gen.getScope() == scope);
}
 
开发者ID:smartenit-eu,项目名称:smartenit,代码行数:5,代码来源:ClassNameAndIntSequenceGenerator.java

示例5: canUseFor

import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
@Override
public boolean canUseFor(ObjectIdGenerator<?> gen) {
    return (gen.getClass() == getClass()) && (gen.getScope() == _scope);
}
 
开发者ID:jsog,项目名称:jsog-jackson,代码行数:5,代码来源:JSOGGenerator.java


注:本文中的com.fasterxml.jackson.annotation.ObjectIdGenerator.getClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。