本文整理汇总了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;
}
示例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;
}
示例3: canUseFor
import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
@Override
public boolean canUseFor(ObjectIdGenerator<?> gen) {
return (gen.getClass() == getClass()) && (gen.getScope() == _scope);
}
示例4: canUseFor
import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
@Override
public boolean canUseFor(ObjectIdGenerator<?> gen) {
return (gen.getClass() == getClass()) && (gen.getScope() == scope);
}
示例5: canUseFor
import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
@Override
public boolean canUseFor(ObjectIdGenerator<?> gen) {
return (gen.getClass() == getClass()) && (gen.getScope() == _scope);
}