public final class Props extends Object
| Constructor and Description |
|---|
Props() |
| Modifier and Type | Method and Description |
|---|---|
static Optional<Object> |
getProperty(Object obj,
String propName)
从指定对象的属性中获取属性值.
|
static Optional<Object> |
getProperty(com.sun.star.beans.XPropertySet props,
String propName)
从指定的属性获取属性值.
|
static com.sun.star.beans.PropertyValue[] |
makeProperties(String[] names,
Object[] values)
使用指定的属性名和值创建
PropertyValue的属性数组. |
static com.sun.star.beans.PropertyValue[] |
makeProperties(String name,
Object value)
使用指定的属性名和值创建
PropertyValue和单个属性的数组. |
static com.sun.star.beans.PropertyValue[] |
makeProperties(String name1,
Object value1,
String name2,
Object value2)
使用指定的属性名和值创建一个包含两个属性的
PropertyValue数组. |
public static Optional<Object> getProperty(Object obj, String propName)
obj - 获取属性的对象.propName - 要获取的属性名.InstrumentException - 如果发生UNO异常。UNO异常将导致 InstrumentException.public static Optional<Object> getProperty(com.sun.star.beans.XPropertySet props, String propName)
props - 获取属性的XPropertySet.propName - 要获取的属性名.InstrumentException - 如果发生UNO异常。UNO异常将导致 InstrumentException.public static com.sun.star.beans.PropertyValue[] makeProperties(String name, Object value)
PropertyValue和单个属性的数组.name - 属性名.value - 属性值.public static com.sun.star.beans.PropertyValue[] makeProperties(String name1, Object value1, String name2, Object value2)
PropertyValue数组.name1 - 第一个属性名.value1 - 第一个属性值.name2 - 第二个属性名.value2 - 第二个属性值.Copyright © 2020. All rights reserved.