public function getAllMethods($types = self::FULL_HIERARCHY) {
    if ($types & self::WITH_OWN) {
      $methods = clone $this->methods;
    } else {
      $methods = new GObjectCollection(array());
    }
    
    if ($types & self::WITH_PARENTS && $this->getParent() != NULL) {
      // treat duplicates (aka: overriden methods):
      $parentTypes = $types | self::WITH_OWN;
      foreach ($this->getParent()->getAllMethods($parentTypes) as $method) {
        if (!$methods->has($method)) {
          $methods->add($method);
        }
      }
    }

    $interfaceTypes = 0x000000;
    if ($types & self::WITH_INTERFACE) $interfaceTypes |= self::WITH_OWN;
    if ($types & self::WITH_PARENTS_INTERFACES) $interfaceTypes |= self::WITH_PARENTS;
    
    foreach ($this->getAllInterfaces($interfaceTypes) as $interface) {
      //$interface->elevateClass();
      // return only own interface methods, because we already have all interfaces from wohle hierarchy
      // or without parents, if we dont like to have the parents interfaces
      foreach ($interface->getMethods() as $method) { 
        if (!$methods->has($method)) {
          $methods->add($method);
        }
      }
    }
    
    return $methods->toArray();
  }