Class TypeConverter
- java.lang.Object
-
- org.freedesktop.dbus.utils.generator.TypeConverter
-
public class TypeConverter extends Object
Helper to convert DBus types and java types.- Since:
- v3.0.1 - 2018-12-22
- Author:
- hypfvieh
-
-
Constructor Summary
Constructors Constructor Description TypeConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetJavaTypeFromDBusType(String _dbusType, Set<String> _javaIncludes)Converts a DBus data type string to java classname(s).static StringgetProperJavaClass(String _argType, Set<String> _includes)Converts a java class type to another type.
-
-
-
Method Detail
-
getProperJavaClass
public static String getProperJavaClass(String _argType, Set<String> _includes)
Converts a java class type to another type. This is used for converting e.g. CharSequence to String etc. It will also remove unnecessary package names like java.lang.- Parameters:
_argType- Argument to convert_includes- Set where additional includes will be added (should never be null!)- Returns:
- String with proper type, if no converation could be done, original input is returned
-
getJavaTypeFromDBusType
public static String getJavaTypeFromDBusType(String _dbusType, Set<String> _javaIncludes) throws DBusException
Converts a DBus data type string to java classname(s).- Parameters:
_dbusType- DBus data type string_javaIncludes- List where additional imports will be added to (should not be null!)- Returns:
- Java classname, maybe null if no suitable input was given
- Throws:
DBusException- on DBus error
-
-