Esempio n. 1
0
 @Test(result = "TypeCreation.O<java.lang.String>.I<java.lang.Number>")
 DeclaredType getDeclaredType2() {
   TypeDeclaration numDecl = env.getTypeDeclaration("java.lang.Number");
   DeclaredType numType = types.getDeclaredType(numDecl);
   DeclaredType OType = getDeclaredType1();
   return types.getDeclaredType(OType, I, numType);
 }
Esempio n. 2
0
 @Test(result = "? extends TypeCreation.A")
 WildcardType getWildcardType() {
   Collection<ReferenceType> uppers = new ArrayList<ReferenceType>();
   Collection<ReferenceType> downers = new ArrayList<ReferenceType>();
   uppers.add(AType);
   return types.getWildcardType(uppers, downers);
 }
Esempio n. 3
0
  protected void init() {
    types = env.getTypeUtils();
    A = env.getTypeDeclaration("TypeCreation.A");
    O = env.getTypeDeclaration("TypeCreation.O");
    I = env.getTypeDeclaration("TypeCreation.O.I");

    AType = types.getDeclaredType(A);
  }
Esempio n. 4
0
 @Test(result = "TypeCreation.O<java.lang.String>")
 DeclaredType getDeclaredType1() {
   TypeDeclaration stringDecl = env.getTypeDeclaration("java.lang.String");
   DeclaredType stringType = types.getDeclaredType(stringDecl);
   return types.getDeclaredType(O, stringType);
 }
Esempio n. 5
0
 @Test(result = "TypeCreation.A[]")
 ArrayType getArrayType2() {
   return types.getArrayType(AType);
 }
Esempio n. 6
0
 @Test(result = "boolean[]")
 ArrayType getArrayType1() {
   return types.getArrayType(types.getPrimitiveType(BOOLEAN));
 }
Esempio n. 7
0
 @Test(result = "void")
 VoidType getVoidType() {
   return types.getVoidType();
 }
Esempio n. 8
0
 @Test(result = "boolean")
 PrimitiveType getPrimitiveType() {
   return types.getPrimitiveType(BOOLEAN);
 }