Exemple #1
0
    def addObjectResource(self, objectResource):
        """Adds the object class hierarchy as resources.

        @param: object object An object instance

        @return RouteCollection The current instance

        """
        assert isinstance(objectResource, Object)

        parent = ReflectionObject(objectResource)
        while parent:
            self.addResource(FileResource(parent.getFileName()))
            parent = parent.getParentClass()

        return self
Exemple #2
0
    def addObjectResource(self, objectResource):
        """Adds the object class hierarchy(, as resources.):

        @param: object object An object instance

        @return ContainerBuilder The current instance

        @api

        """
        assert isinstance(objectResource, Object)
        if not self.__trackResources:
            return self

        parent = ReflectionObject(objectResource)
        while parent:
            self.addResource(FileResource(parent.getFileName()))
            parent = parent.getParentClass()

        return self