Examples of CtInterface


Examples of spoon.reflect.declaration.CtInterface

     
      clearMappings();
     
      CtPackage ctPackage = launcher.getFactory().Package().getOrCreate("com.example");
      //CtClass ctClass = launcher.getFactory().Class().create("com.example.TestClass1");
      CtInterface ctInterface = launcher.getFactory().Interface().create("com.example.TestClass1");
      ctPackage.getTypes().add(ctInterface);
      scanner.visitCtPackage(ctPackage)// calls visitCtInterface which creates the complex type mapping
     
      XSDComplexTypeDefinition complexType = scanner.typeXSDComplexTypeMap.get(ctInterface);
      assertTrue(complexType != null);
      assertTrue(complexType.getName().equals(ctInterface.getSimpleName()));
      assertTrue(complexType.getTargetNamespace().equals(ctPackage.getQualifiedName()));
           
    }catch(Exception e){
      System.err.println("Exception: " + e.getMessage());
      assertTrue(false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.