java.lang.Object
org.freedesktop.dbus.utils.DBusObjects
Various validations.
- Seit:
- 5.0.0 - 2023-11-08
- Autor:
- hypfvieh
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic void
ensurePublicInterfaces
(Object _object) Ensures that all interfaces found on the given object a public accessable.static String
requireBusName
(String _busName) Ensures given string is a valid bus name.static String
requireBusName
(String _busName, String _customMessage) Ensures given string is a valid bus name.static String
requireBusNameOrConnectionId
(String _busNameOrConnId) Ensures given string is a valid bus name or connection Id.static String
requireConnectionId
(String _connId) Ensures given string is a valid connection Id.static String
requireNotBusName
(String _busName, String _customMessage) Ensures given string is NOT a valid bus name.static <T,
X extends Exception>
TrequireNotNull
(T _input, Supplier<X> _exception) Ensure given value is not null.static String
requireObjectPath
(String _objectPath) Ensures given string is a valid object path.static boolean
validateBusName
(String _busName) Checks if input is valid bus name.static boolean
validateConnectionId
(String _connectionId) Checks if input is a valid connection Id.static boolean
validateNotBusName
(String _busName) Checks if input is NOT a valid bus name.static boolean
validateNotConnectionId
(String _connectionId) Checks if input is NOT a valid connection Id.static boolean
validateNotObjectPath
(String _objectPath) Checks if input is NOT a valid object path.static boolean
validateObjectPath
(String _objectPath) Checks if input is a valid object path.
-
Methodendetails
-
requireObjectPath
Ensures given string is a valid object path.- Parameter:
_objectPath
- string to check- Gibt zurück:
- input string if valid
- Löst aus:
InvalidObjectPathException
- when input is not a valid object path
-
requireBusName
Ensures given string is a valid bus name.- Parameter:
_busName
- string to check- Gibt zurück:
- input if valid
- Löst aus:
InvalidBusNameException
- when input is not a valid bus name
-
requireBusName
public static String requireBusName(String _busName, String _customMessage) throws InvalidBusNameException Ensures given string is a valid bus name.- Parameter:
_busName
- string to check_customMessage
- custom exception message- Gibt zurück:
- input if valid
- Löst aus:
InvalidBusNameException
- when input is not a valid bus name
-
requireNotBusName
public static String requireNotBusName(String _busName, String _customMessage) throws InvalidBusNameException Ensures given string is NOT a valid bus name.- Parameter:
_busName
- string to check_customMessage
- custom exception message- Gibt zurück:
- input if valid
- Löst aus:
InvalidBusNameException
- when input is a valid bus name
-
requireConnectionId
Ensures given string is a valid connection Id.- Parameter:
_connId
- string to check- Gibt zurück:
- input if valid
- Löst aus:
InvalidBusNameException
- when input is not a valid connection Id
-
requireBusNameOrConnectionId
public static String requireBusNameOrConnectionId(String _busNameOrConnId) throws InvalidBusNameException Ensures given string is a valid bus name or connection Id.- Parameter:
_busNameOrConnId
- string to check- Gibt zurück:
- input if valid
- Löst aus:
InvalidBusNameException
- when input is not a valid bus name or connection Id
-
validateBusName
Checks if input is valid bus name.- Parameter:
_busName
- input to check- Gibt zurück:
- true if valid
-
validateNotBusName
Checks if input is NOT a valid bus name.- Parameter:
_busName
- input to check- Gibt zurück:
- true if invalid
-
validateObjectPath
Checks if input is a valid object path.- Parameter:
_objectPath
- input to check- Gibt zurück:
- true if valid
-
validateNotObjectPath
Checks if input is NOT a valid object path.- Parameter:
_objectPath
- input to check- Gibt zurück:
- true if invalid
-
validateNotConnectionId
Checks if input is NOT a valid connection Id.- Parameter:
_connectionId
- input to check- Gibt zurück:
- true if invalid
-
validateConnectionId
Checks if input is a valid connection Id.- Parameter:
_connectionId
- input to check- Gibt zurück:
- true if valid
-
requireNotNull
Ensure given value is not null.- Typparameter:
T
- input typeX
- exception type to throw- Parameter:
_input
- input to validate_exception
- supplier providing exception which will be thrown if input is null- Gibt zurück:
- input if not null
- Löst aus:
X
- exception provided by supplier thrown when input was null
-
ensurePublicInterfaces
Ensures that all interfaces found on the given object a public accessable.- Parameter:
_object
- object to check- Löst aus:
InvalidInterfaceSignature
- when there is any interface on the given object which is non public
-