Top "Static-methods" questions

Methods that neither require an instance of the class nor can they implicitly access the data (or this, self, Me, etc.

Static method in a generic class?

In Java, I'd like to have something as: class Clazz<T> { static void doIt(T object) { // ... } } But I …

java generics static-methods
Class method differences in Python: bound, unbound and static

What is the difference between the following class methods? Is it that one is static and the other is not? …

python static-methods
How can I solve "Non-static method xxx:xxx() should not be called statically in PHP 5.4?

Currently using a large platform in PHP. The server it's hosted on has recently been upgraded to PHP 5.4. Since, I've …

php static-methods
Calling class staticmethod within the class body?

When I attempt to use a static method from within the body of the class, and define the static method …

python decorator static-methods
How to verify static void method has been called with power mockito

I am using the following. Powermock-mockito 1.5.12 Mockito 1.95 junit 4.11 Here is my utils class public void InternalUtils { public static void sendEmail(…

java unit-testing mockito static-methods
Static methods - How to call a method from another method?

When I have regular methods for calling another method in a class, I have to do this class test: def __…

python static-methods
Calling static method in python

I have a class Person and a static method in that class called call_person: class Person: def call_person(): …

python static-methods
How do I call a static method of another class

I have a class, lets say CAppPath which has a static method: public: static CString GetAppPath(); and in CAppPath.cpp …

c++ windows oop mfc static-methods
C# Static variables - scope and persistence

I just did a little experiment: public abstract class MyClass { private static int myInt = 0; public static int Foo() { return myInt; } …

c# static-methods static-members
TypeScript: Access static methods within classes (the same or another ones)

Suppose we have the following code: [Test.js file]: class Test { ... public static aStaticFunction():void { ... this.aMemberFunction(); // <- Issue #1. } …

javascript typescript static-methods