# Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. # License: Apache License, Version 2.0 module Superiseable def superised @superised = true end def method_added(method_name) if @superised superising method_name end @superised = false end def superising method_name @superized_methods ||= [] @superized_methods << method_name end def register_java_implementation(klass) self.included(klass) if self.respond_to?(:included) return unless @superized_methods @superized_methods.each do |method_name| klass.class_eval do define_method(method_name) { |*args| super *args} end end end end