Class ExportedObject

java.lang.Object
org.freedesktop.dbus.messages.ExportedObject

public class ExportedObject extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • generateAnnotationsXml

      protected String generateAnnotationsXml(AnnotatedElement _c)
      Generates the introspection data xml for annotations
      Parameters:
      _c - input interface/method/signal
      Returns:
      xml with annotation definition
    • generatePropertyXml

      protected 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
    • generatePropertyXml

      protected String generatePropertyXml(String _propertyName, Class<?> _propertyTypeClass, DBusProperty.Access _access, PropertiesEmitsChangedSignal.EmitChangeSignal _emitChangeSignal) throws DBusException
      Generates the introspection data for the single property.
      Parameters:
      _propertyName - name
      _propertyTypeClass - type class
      _access - type access
      Returns:
      xml with property definition
      Throws:
      DBusException - in case of unknown data types
    • generatePropertiesXml

      protected String generatePropertiesXml(Class<?> _clz) throws DBusException
      Generates 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 String generateMethodsXml(Class<?> _clz) throws DBusException
      Generates the introspection data for the input interface methods
      Parameters:
      _clz - input interface
      Returns:
      xml with method definitions
      Throws:
      DBusException - if marshalling fails
    • createReturnArguments

      private void createReturnArguments(Method _meth, StringBuilder _sb) throws DBusException
      Creates the XML parameters for return types of Container based classes. This method supports both, parameterized and regular return types.
      Parameters:
      _meth - method which return value is investigated
      _sb - StringBuilder to append arguments to
      Throws:
      DBusException - when converting signature fails
    • generateSignalsXml

      protected String generateSignalsXml(Class<?> _clz) throws DBusException
      Generates 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 Set<Class<?>> getDBusInterfaces(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 the DBusInterface.
      Parameters:
      _inputClazz - input object class
      Returns:
      set of DBus interfaces implements in the input class
    • generateIntrospectionXml

      private String generateIntrospectionXml(Set<Class<?>> _interfaces) throws DBusException
      Throws:
      DBusException
    • getMethods

      public Map<MethodTuple,Method> getMethods()
    • getPropertyMethods

      public Map<PropertyRef,Method> getPropertyMethods()
    • getObject

      public Reference<DBusInterface> getObject()
    • getIntrospectiondata

      public String getIntrospectiondata()
    • getImplementedInterfaces

      public Set<Class<?>> getImplementedInterfaces()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isExcluded

      public static boolean isExcluded(Method _meth)