public final class Props
extends java.lang.Object
Inspired by the work of Dr. Andrew Davison from the website Java LibreOffice Programming.
| Modifier and Type | Method and Description |
|---|---|
static @NonNull java.lang.Object |
getProperty(@NonNull java.lang.Object obj,
@NonNull java.lang.String propName)
Gets a property value from the properties of the specified object.
|
static @NonNull java.lang.Object |
getProperty(@NonNull com.sun.star.beans.XPropertySet props,
@NonNull java.lang.String propName)
Gets a property value from the specified properties.
|
static @NonNull com.sun.star.beans.PropertyValue[] |
makeProperties(@NonNull java.lang.String[] names,
@NonNull java.lang.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 java.lang.String name,
@NonNull java.lang.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 java.lang.String name1,
@NonNull java.lang.Object value1,
@NonNull java.lang.String name2,
@NonNull java.lang.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 java.lang.String name,
@NonNull java.lang.Object value)
Creates a
PropertyValue with the specified name and value. |
public static @NonNull java.lang.Object getProperty(@NonNull java.lang.Object obj,
@NonNull java.lang.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 java.lang.Object getProperty(@NonNull com.sun.star.beans.XPropertySet props,
@NonNull java.lang.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 java.lang.String name,
@NonNull java.lang.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 java.lang.String name,
@NonNull java.lang.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 java.lang.String name1,
@NonNull java.lang.Object value1,
@NonNull java.lang.String name2,
@NonNull java.lang.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 java.lang.String[] names,
@NonNull java.lang.Object[] values)
PropertyValue with properties using the specified property names
and values.names - The property names.values - The property values.Copyright © 2022 - present; JODConverter. All rights reserved.