summaryrefslogtreecommitdiffstats
path: root/tests/bugs153/pr151978/IMessage.java
blob: efedcb5acde5f763e58d4f4af0ad16546bd3ee44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
public interface IMessage {
  void publish();
}


interface IErrorMessage extends IMessage{
  StackTraceElement[] getStackTrace();
}

interface IObjectFactory<E> {
  public <T extends E> T create(Class<T> theObjectType, Object[]
theParameters);
}

class MessageFactory implements IObjectFactory<IMessage>{
  public <T extends IMessage> T create(Class<T> theObjectType, Object[]
theParameters) {
    return null;
  }
}

class Main {
  public static void main(String[] args) {
    IErrorMessage message = new MessageFactory().create(IErrorMessage.class,
new Object[]{"Foo","Bar"});
  }
}