예제 #1
0
  @Test
  public void testPrimitiveParameter() throws Exception {
    Type typeParameter = new Type("Z", null);
    assertFalse(typeParameter.isClassType());
    assertFalse(typeParameter.isTypeParameter());
    assertTrue(typeParameter.isPrimitiveType());

    assertEquals("boolean", typeParameter.getPrimitiveTypeName());
  }
예제 #2
0
  @Test
  public void testClassParameter() throws Exception {
    Type typeParameter = new Type("Ljava/lang/Object;", null);
    assertTrue(typeParameter.isClassType());
    assertFalse(typeParameter.isTypeParameter());
    assertFalse(typeParameter.isPrimitiveType());

    assertEquals("java.lang.Object", typeParameter.getClassName());
  }