There is no way in an abstract class (or interface) to indicate that the implementation class must have a specific static method.
Using reflection, you can get a similar effect.
AnimalFactory Animal:
public interface AnimalFactory {
Animal getInstance(byte[] b);
}
public class DogFactory implements AnimalFactory {
public Dog getInstance(byte[] b) {
return new Dog(...);
}
}
public interface Animal {
}
class Dog implements Animal {
}