Package org.freedesktop.dbus.messages
Class ExportedObject
- java.lang.Object
-
- org.freedesktop.dbus.messages.ExportedObject
-
public class ExportedObject extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringintrospectionDataprivate java.util.Map<MethodTuple,java.lang.reflect.Method>methodsprivate java.lang.ref.Reference<DBusInterface>object
-
Constructor Summary
Constructors Constructor Description ExportedObject(DBusInterface _object, boolean _weakreferences)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgenerateAnnotationsXml(java.lang.reflect.AnnotatedElement _c)Generates the introspection data xml for annotationsprivate java.lang.StringgenerateIntrospectionXml(java.util.Set<java.lang.Class<?>> _interfaces)protected java.lang.StringgenerateMethodsXml(java.lang.Class<?> _clz)Generates the introspection data for the input interface methodsprotected java.lang.StringgeneratePropertiesXml(java.lang.Class<?> _clz)Generates the introspection data for the input interface properties.protected java.lang.StringgeneratePropertyXml(DBusProperty _property)Generates the introspection data for the single property.protected java.lang.StringgenerateSignalsXml(java.lang.Class<?> _clz)Generates the introspection data for the input interface signalsprotected java.util.Set<java.lang.Class<?>>getDBusInterfaces(java.lang.Class<?> _inputClazz)Get all valid DBus interfaces which are implemented in a given class.java.lang.StringgetIntrospectiondata()java.util.Map<MethodTuple,java.lang.reflect.Method>getMethods()java.lang.ref.Reference<DBusInterface>getObject()static booleanisExcluded(java.lang.reflect.Method _meth)
-
-
-
Field Detail
-
methods
private final java.util.Map<MethodTuple,java.lang.reflect.Method> methods
-
introspectionData
private final java.lang.String introspectionData
-
object
private final java.lang.ref.Reference<DBusInterface> object
-
-
Constructor Detail
-
ExportedObject
public ExportedObject(DBusInterface _object, boolean _weakreferences) throws DBusException
- Throws:
DBusException
-
-
Method Detail
-
generateAnnotationsXml
protected java.lang.String generateAnnotationsXml(java.lang.reflect.AnnotatedElement _c)
Generates the introspection data xml for annotations- Parameters:
_c- input interface/method/signal- Returns:
- xml with annotation definition
-
generatePropertyXml
protected java.lang.String generatePropertyXml(DBusProperty _property) throws DBusException
Generates the introspection data for the single property.- Parameters:
_property- input property annotation- Returns:
- xml with property definition
- Throws:
DBusException- in case of unknown data types
-
generatePropertiesXml
protected java.lang.String generatePropertiesXml(java.lang.Class<?> _clz) throws DBusExceptionGenerates the introspection data for the input interface properties.- Parameters:
_clz- input interface- Returns:
- xml with property definitions
- Throws:
DBusException- in case of unknown data types
-
generateMethodsXml
protected java.lang.String generateMethodsXml(java.lang.Class<?> _clz) throws DBusExceptionGenerates the introspection data for the input interface methods- Parameters:
_clz- input interface- Returns:
- xml with method definitions
- Throws:
DBusException- if marshalling fails
-
generateSignalsXml
protected java.lang.String generateSignalsXml(java.lang.Class<?> _clz) throws DBusExceptionGenerates the introspection data for the input interface signals- Parameters:
_clz- input interface- Returns:
- xml with signal definitions
- Throws:
DBusException- in case of invalid signal name / data types
-
getDBusInterfaces
protected java.util.Set<java.lang.Class<?>> getDBusInterfaces(java.lang.Class<?> _inputClazz)
Get all valid DBus interfaces which are implemented in a given class. The search is performed without recursion taking into account object inheritance. A valid DBus interface must directly extend theDBusInterface.- Parameters:
_inputClazz- input object class- Returns:
- set of DBus interfaces implements in the input class
-
generateIntrospectionXml
private java.lang.String generateIntrospectionXml(java.util.Set<java.lang.Class<?>> _interfaces) throws DBusException- Throws:
DBusException
-
getMethods
public java.util.Map<MethodTuple,java.lang.reflect.Method> getMethods()
-
getObject
public java.lang.ref.Reference<DBusInterface> getObject()
-
getIntrospectiondata
public java.lang.String getIntrospectiondata()
-
isExcluded
public static boolean isExcluded(java.lang.reflect.Method _meth)
-
-