<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Static Methods in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/static-methods/m-p/4041166#M965911</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why are static methods defined in super class cant be reimplemented in sub-classes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any workaround for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arpit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jun 2008 08:04:11 GMT</pubDate>
    <dc:creator>arpitgoyal</dc:creator>
    <dc:date>2008-06-18T08:04:11Z</dc:date>
    <item>
      <title>Static Methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/static-methods/m-p/4041166#M965911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why are static methods defined in super class cant be reimplemented in sub-classes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any workaround for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arpit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 08:04:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/static-methods/m-p/4041166#M965911</guid>
      <dc:creator>arpitgoyal</dc:creator>
      <dc:date>2008-06-18T08:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Static Methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/static-methods/m-p/4041167#M965912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aprit ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So as to avoid method overidding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Static method::::&lt;/P&gt;&lt;P&gt;It is a class method&lt;/P&gt;&lt;P&gt;Accessed using class name.method name &lt;/P&gt;&lt;P&gt;For using static methods, creation of instance is not necessary&lt;/P&gt;&lt;P&gt;A static method can only access other static data and methods. It  cannot access non-static members&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you go implementing it in subclass this has to be done before implementing&lt;/P&gt;&lt;P&gt;HIDDING :&lt;/P&gt;&lt;P&gt;See if a sublcass defines a class method (static method) with the same signature as a class method  in the super class the method in the subclass Hides the one in super-class&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hiddding a static method of a super class looks like overidiing an instance method of a superclass.When you overide an instance method we'll have the runtime polymorphism but when we do it with static method there is no runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers &lt;/P&gt;&lt;P&gt;Mohinder Singh Chauhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 09:32:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/static-methods/m-p/4041167#M965912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T09:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Static Methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/static-methods/m-p/4041168#M965913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Static Methods are Class Specific and not instance specific. Therefore whether it a parent class or the child class the definition of the method cannot be different. Such methods do not need the instance of the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not able to clearly understand your requirement. I am not sure of the Work around but you can have a static method in your class that can be called. Here you can decide to call either the super class or have your own implementation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 09:36:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/static-methods/m-p/4041168#M965913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T09:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Static Methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/static-methods/m-p/4041169#M965914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is only one static component per program context. To summarize:&lt;/P&gt;&lt;P&gt;Static Components and Inheritance&lt;/P&gt;&lt;P&gt;&amp;#149; A class that defines a public or protected static attribute shares this attribute&lt;/P&gt;&lt;P&gt;with all its subclasses&lt;/P&gt;&lt;P&gt;&amp;#149; Static methods cannot be redefined&lt;/P&gt;&lt;P&gt;Static methods cannot be abstract because they cannot be redefined.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2008 04:01:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/static-methods/m-p/4041169#M965914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-19T04:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Static Methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/static-methods/m-p/4041170#M965915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as was described by the other posters on this thread, the fact that static methods cannot be overridden is a design decision underlying ABAP Objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to inherit from an ABAP class in the standard, I don't have a solution. If you are free to change things because they are in your own coding, I can propose a workaround.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is to change your class so that the static methods become instance methods of a singleton. Object creation can be done in the class constructor. Now you can inherit from the singleton class and override methods normally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Joerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2008 12:24:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/static-methods/m-p/4041170#M965915</guid>
      <dc:creator>joerg_wegener</dc:creator>
      <dc:date>2008-06-19T12:24:07Z</dc:date>
    </item>
  </channel>
</rss>

