本文整理了Java中org.yaml.snakeyaml.introspector.Property.getType()
方法的一些代码示例,展示了Property.getType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.getType()
方法的具体详情如下:
包路径:org.yaml.snakeyaml.introspector.Property
类名称:Property
方法名:getType
暂无
代码示例来源:origin: redisson/redisson
@Override
public Class<?> getType() {
final Class<?> t = super.getType();
if (t != null) {
return t;
}
return delegate != null ? delegate.getType() : null;
}
代码示例来源:origin: redisson/redisson
@Override
public boolean equals(Object other) {
if (other instanceof Property) {
Property p = (Property) other;
return getName().equals(p.getName()) && getType().equals(p.getType());
}
return false;
}
}
代码示例来源:origin: redisson/redisson
@Override
public int hashCode() {
return getName().hashCode() + getType().hashCode();
}
代码示例来源:origin: redisson/redisson
@Override
public String toString() {
return getName() + " of " + getType();
}
代码示例来源:origin: redisson/redisson
/**
* Provide the name of the property which is used when the entries form a
* sequence. The property must be a List.
* @param bean the class to provide exactly one List property
* @return name of the List property
*/
protected String getSequencePropertyName(Class<?> bean) {
Set<Property> properties = getPropertyUtils().getProperties(bean);
for (Iterator<Property> iterator = properties.iterator(); iterator.hasNext();) {
Property property = iterator.next();
if (!List.class.isAssignableFrom(property.getType())) {
iterator.remove();
}
}
if (properties.size() == 0) {
throw new YAMLException("No list property found in " + bean);
} else if (properties.size() > 1) {
throw new YAMLException(
"Many list properties found in "
+ bean
+ "; Please override getSequencePropertyName() to specify which property to use.");
}
return properties.iterator().next().getName();
}
}
代码示例来源:origin: redisson/redisson
if (nodeId == NodeId.scalar) {
if (property.getType() != java.lang.Enum.class) {
if (propertyValue instanceof Enum<?>) {
nodeValue.setTag(Tag.STR);
if (property.getType() == propertyValue.getClass()) {
if (!(propertyValue instanceof Map<?, ?>)) {
if (!nodeValue.getTag().equals(Tag.SET)) {
代码示例来源:origin: redisson/redisson
valueNode.setType(property.getType());
final boolean typeDetected = (memberDescription != null)
? memberDescription.setupPropertyType(key, valueNode)
if (property.getType() == Float.TYPE || property.getType() == Float.class) {
if (value instanceof Double) {
value = ((Double) value).floatValue();
if (property.getType() == String.class && Tag.BINARY.equals(valueNode.getTag())
&& value instanceof byte[]) {
value = new String((byte[]) value);
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
@Override
public Class<?> getType() {
final Class<?> t = super.getType();
if (t != null) {
return t;
}
return delegate != null ? delegate.getType() : null;
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
@Override
public boolean equals(Object other) {
if (other instanceof Property) {
Property p = (Property) other;
return getName().equals(p.getName()) && getType().equals(p.getType());
}
return false;
}
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
@Override
public String toString() {
return getName() + " of " + getType();
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
@Override
public int hashCode() {
return getName().hashCode() + getType().hashCode();
}
代码示例来源:origin: harbby/presto-connectors
@Override
public boolean equals(Object other) {
if (other instanceof Property) {
Property p = (Property) other;
return name.equals(p.getName()) && type.equals(p.getType());
}
return false;
}
}
代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml
@Override
public boolean equals(Object other) {
if (other instanceof Property) {
Property p = (Property) other;
return name.equals(p.getName()) && type.equals(p.getType());
}
return false;
}
}
代码示例来源:origin: org.qsardb.cargo/bodo
public int compare(Property left, Property right){
int leftScore = score(left.getType());
int rightScore = score(right.getType());
return (leftScore - rightScore);
}
代码示例来源:origin: harbby/presto-connectors
@Override
public String toString() {
return getName() + " of " + getType();
}
代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml
@Override
public String toString() {
return getName() + " of " + getType();
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/**
* Provide the name of the property which is used when the entries form a
* sequence. The property must be a List.
* @param bean the class to provide exactly one List property
* @return name of the List property
*/
protected String getSequencePropertyName(Class<?> bean) {
Set<Property> properties = getPropertyUtils().getProperties(bean);
for (Iterator<Property> iterator = properties.iterator(); iterator.hasNext();) {
Property property = iterator.next();
if (!List.class.isAssignableFrom(property.getType())) {
iterator.remove();
}
}
if (properties.size() == 0) {
throw new YAMLException("No list property found in " + bean);
} else if (properties.size() > 1) {
throw new YAMLException(
"Many list properties found in "
+ bean
+ "; Please override getSequencePropertyName() to specify which property to use.");
}
return properties.iterator().next().getName();
}
}
代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml
/**
* Provide the name of the property which is used when the entries form a
* sequence. The property must be a List.
*
* @throws IntrospectionException
*/
protected String getSequencePropertyName(Class<?> bean) throws IntrospectionException {
Set<Property> properties = getPropertyUtils().getProperties(bean);
for (Iterator<Property> iterator = properties.iterator(); iterator.hasNext();) {
Property property = iterator.next();
if (!List.class.isAssignableFrom(property.getType())) {
iterator.remove();
}
}
if (properties.size() == 0) {
throw new YAMLException("No list property found in " + bean);
} else if (properties.size() > 1) {
throw new YAMLException(
"Many list properties found in "
+ bean
+ "; Please override getSequencePropertyName() to specify which property to use.");
}
return properties.iterator().next().getName();
}
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
return new Property(result.getName(), result.getType())
代码示例来源:origin: jsevellec/cassandra-unit
return new Property(result.getName(), result.getType())
内容来源于网络,如有侵权,请联系作者删除!