java.lang.Object
org.freedesktop.dbus.utils.DBusObjects
Various validations.
- Seit:
- 5.0.0 - 2023-11-08
- Autor:
- hypfvieh
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic voidensurePublicInterfaces(Object _object) Ensures that all interfaces found on the given object a public accessable.static StringrequireBusName(String _busName) Ensures given string is a valid bus name.static StringrequireBusName(String _busName, String _customMessage) Ensures given string is a valid bus name.static StringrequireBusNameOrConnectionId(String _busNameOrConnId) Ensures given string is a valid bus name or connection Id.static StringrequireConnectionId(String _connId) Ensures given string is a valid connection Id.static StringrequireNotBusName(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 StringrequireObjectPath(String _objectPath) Ensures given string is a valid object path.static booleanvalidateBusName(String _busName) Checks if input is valid bus name.static booleanvalidateConnectionId(String _connectionId) Checks if input is a valid connection Id.static booleanvalidateNotBusName(String _busName) Checks if input is NOT a valid bus name.static booleanvalidateNotConnectionId(String _connectionId) Checks if input is NOT a valid connection Id.static booleanvalidateNotObjectPath(String _objectPath) Checks if input is NOT a valid object path.static booleanvalidateObjectPath(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
-