org.yaml.snakeyaml.introspector.Property.isWritable()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(68)

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

Property.isWritable介绍

暂无

代码示例

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

@Override
public boolean isWritable() {
  return (write != null) || (field != null) || (delegate != null && delegate.isWritable());
}

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

protected Set<Property> createPropertySet(Class<? extends Object> type, BeanAccess bAccess) {
  Set<Property> properties = new TreeSet<Property>();
  Collection<Property> props = getPropertiesMap(type, bAccess).values();
  for (Property property : props) {
    if (property.isReadable() && (allowReadOnlyProperties || property.isWritable())) {
      properties.add(property);
    }
  }
  return properties;
}

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

: memberDescription.getProperty(key);
if (!property.isWritable()) {
  throw new YAMLException("No writable property '" + key + "' on class: "
      + beanType.getName());

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

@Override
public boolean isWritable() {
  return (write != null) || (field != null) || (delegate != null && delegate.isWritable());
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

protected Set<Property> createPropertySet(Class<? extends Object> type, BeanAccess bAccess) {
  Set<Property> properties = new TreeSet<Property>();
  Collection<Property> props = getPropertiesMap(type, bAccess).values();
  for (Property property : props) {
    if (property.isReadable() && (allowReadOnlyProperties || property.isWritable())) {
      properties.add(property);
    }
  }
  return properties;
}

代码示例来源:origin: CodeCrafter47/BungeeTabListPlus

@Override
  protected Set<Property> createPropertySet(Class<? extends Object> type, BeanAccess bAccess)
      throws IntrospectionException {
    Set<Property> properties = new LinkedHashSet<>();
    Collection<Property> props = getPropertiesMap(type, bAccess).values();
    for (Property property : props) {
      if (property.isReadable() && property.isWritable()) {
        properties.add(property);
      }
    }
    return properties;
  }
}

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

protected Set<Property> createPropertySet(Class<? extends Object> type, BeanAccess bAccess)
    throws IntrospectionException {
  Set<Property> properties = new TreeSet<Property>();
  Collection<Property> props = getPropertiesMap(type, bAccess).values();
  for (Property property : props) {
    if (property.isReadable() && (allowReadOnlyProperties || property.isWritable())) {
      properties.add(property);
    }
  }
  return properties;
}

代码示例来源:origin: harbby/presto-connectors

protected Set<Property> createPropertySet(Class<? extends Object> type, BeanAccess bAccess)
    throws IntrospectionException {
  Set<Property> properties = new TreeSet<Property>();
  Collection<Property> props = getPropertiesMap(type, bAccess).values();
  for (Property property : props) {
    if (property.isReadable() && (allowReadOnlyProperties || property.isWritable())) {
      properties.add(property);
    }
  }
  return properties;
}

代码示例来源:origin: com.hotels/shunting-yard-replicator

private synchronized boolean include(Property property) {
 boolean eligible = property.isReadable() && (allowReadOnlyProperties || property.isWritable());
 if (!eligible) {
  return false;
 }
 if (MethodProperty.class.isAssignableFrom(property.getClass())) {
  PropertyDescriptor propertyDescriptor = getPropertyDescriptor((MethodProperty) property);
  if (propertyDescriptor != null && isTransient(propertyDescriptor)) {
   return false;
  }
 }
 return true;
}

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

public Property getProperty(Class<? extends Object> type, String name, BeanAccess bAccess)
    throws IntrospectionException {
  Map<String, Property> properties = getPropertiesMap(type, bAccess);
  Property property = properties.get(name);
  if (property == null && skipMissingProperties) {
    property = new MissingProperty(name);
  }
  if (property == null || !property.isWritable()) {
    throw new YAMLException("Unable to find property '" + name + "' on class: "
        + type.getName());
  }
  return property;
}

代码示例来源:origin: harbby/presto-connectors

public Property getProperty(Class<? extends Object> type, String name, BeanAccess bAccess)
    throws IntrospectionException {
  Map<String, Property> properties = getPropertiesMap(type, bAccess);
  Property property = properties.get(name);
  if (property == null && skipMissingProperties) {
    property = new MissingProperty(name);
  }
  if (property == null || !property.isWritable()) {
    throw new YAMLException("Unable to find property '" + name + "' on class: "
        + type.getName());
  }
  return property;
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

: memberDescription.getProperty(key);
if (!property.isWritable()) {
  throw new YAMLException("No writable property '" + key + "' on class: "
      + beanType.getName());

相关文章