Java 类com.google.inject.spi.InjectionPoint.Signature 实例源码

项目:guice    文件:InjectionPointTest.java   
public void testSignature() throws Exception {
  Signature fooA = new Signature(Foo.class.getDeclaredMethod("a", String.class, int.class));
  Signature fooB = new Signature(Foo.class.getDeclaredMethod("b"));
  Signature barA = new Signature(Bar.class.getDeclaredMethod("a", String.class, int.class));
  Signature barB = new Signature(Bar.class.getDeclaredMethod("b"));

  assertEquals(fooA.hashCode(), barA.hashCode());
  assertEquals(fooB.hashCode(), barB.hashCode());
  assertEquals(fooA, barA);
  assertEquals(fooB, barB);
}
项目:guice-old    文件:InjectionPointTest.java   
public void testSignature() throws Exception {
  Signature fooA = new Signature(Foo.class.getDeclaredMethod(
      "a", String.class, int.class));
  Signature fooB = new Signature(Foo.class.getDeclaredMethod("b"));
  Signature barA = new Signature(Bar.class.getDeclaredMethod(
      "a", String.class, int.class));
  Signature barB = new Signature(Bar.class.getDeclaredMethod("b"));

  assertEquals(fooA.hashCode(), barA.hashCode());
  assertEquals(fooB.hashCode(), barB.hashCode());
  assertEquals(fooA, barA);
  assertEquals(fooB, barB);
}
项目:google-guice    文件:InjectionPointTest.java   
public void testSignature() throws Exception {
  Signature fooA = new Signature(Foo.class.getDeclaredMethod(
      "a", String.class, int.class));
  Signature fooB = new Signature(Foo.class.getDeclaredMethod("b"));
  Signature barA = new Signature(Bar.class.getDeclaredMethod(
      "a", String.class, int.class));
  Signature barB = new Signature(Bar.class.getDeclaredMethod("b"));

  assertEquals(fooA.hashCode(), barA.hashCode());
  assertEquals(fooB.hashCode(), barB.hashCode());
  assertEquals(fooA, barA);
  assertEquals(fooB, barB);
}