java.lang.Object
org.freedesktop.dbus.utils.generator.TypeConverter
Helper to convert DBus types and java types.
- Seit:
- v3.0.1 - 2018-12-22
- Autor:
- hypfvieh
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic StringconvertJavaType(String _fqcn, boolean _usePrimitives) Transform certain java types to other java types (seeCLASS_MAP).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.
-
Methodendetails
-
getProperJavaClass
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.- Parameter:
_argType- Argument to convert_includes- Set where additional includes will be added (should never be null!)- Gibt zurück:
- String with proper type, if no converation could be done, original input is returned
-
convertJavaType
Transform certain java types to other java types (seeCLASS_MAP).- Parameter:
_fqcn- fully qualified classname of the type to convert_usePrimitives- if true, boxed types will be converted to primitives- Gibt zurück:
- converted type or original input
-
getJavaTypeFromDBusType
public static String getJavaTypeFromDBusType(String _dbusType, Set<String> _javaIncludes) throws DBusException Converts a DBus data type string to java classname(s).- Parameter:
_dbusType- DBus data type string_javaIncludes- List where additional imports will be added to (should not be null!)- Gibt zurück:
- Java classname, maybe null if no suitable input was given
- Löst aus:
DBusException- on DBus error
-