public final class Props extends Object
Inspired by the work of Dr. Andrew Davison from the website Java LibreOffice Programming.
| Modifier and Type | Method and Description |
|---|---|
static @NonNull Object |
getProperty(@NonNull Object obj,
@NonNull String propName)
Gets a property value from the properties of the specified object.
|
static @NonNull Object |
getProperty(@NonNull com.sun.star.beans.XPropertySet props,
@NonNull String propName)
Gets a property value from the specified properties.
|
static @NonNull com.sun.star.beans.PropertyValue[] |
makeProperties(@NonNull String[] names,
@NonNull Object[] values)
Creates an array of
PropertyValue with properties using the specified property names
and values. |
static @NonNull com.sun.star.beans.PropertyValue[] |
makeProperties(@NonNull String name,
@NonNull Object value)
Creates an array of
PropertyValue with a single property using the specified property
name and value. |
static @NonNull com.sun.star.beans.PropertyValue[] |
makeProperties(@NonNull String name1,
@NonNull Object value1,
@NonNull String name2,
@NonNull Object value2)
Creates an array of
PropertyValue with 2 properties using the specified property names
and values. |
static @NonNull com.sun.star.beans.PropertyValue |
makeProperty(@NonNull String name,
@NonNull Object value)
Creates a
PropertyValue with the specified name and value. |
public static @NonNull Object getProperty(@NonNull Object obj, @NonNull String propName)
obj - The object from which a property is get.propName - The property name to get.WrappedUnoException - If an UNO exception occurs. The UNO exception will be the cause of
the WrappedUnoException.public static @NonNull Object getProperty(@NonNull com.sun.star.beans.XPropertySet props, @NonNull String propName)
props - The XPropertySet from which a property is get.propName - The property name to get.WrappedUnoException - If an UNO exception occurs. The UNO exception will be the cause of
the WrappedUnoException.public static @NonNull com.sun.star.beans.PropertyValue makeProperty(@NonNull String name, @NonNull Object value)
PropertyValue with the specified name and value.name - The property name.value - The property value.PropertyValue.public static @NonNull com.sun.star.beans.PropertyValue[] makeProperties(@NonNull String name, @NonNull Object value)
PropertyValue with a single property using the specified property
name and value.name - The property name.value - The property value.public static @NonNull com.sun.star.beans.PropertyValue[] makeProperties(@NonNull String name1, @NonNull Object value1, @NonNull String name2, @NonNull Object value2)
PropertyValue with 2 properties using the specified property names
and values.name1 - The first property name.value1 - The first property value.name2 - The second property name.value2 - The second property value.public static @NonNull com.sun.star.beans.PropertyValue[] makeProperties(@NonNull String[] names, @NonNull Object[] values)
PropertyValue with properties using the specified property names
and values.names - The property names.values - The property values.Copyright © 2016 - present; JODConverter.org. All rights reserved.