Examples of CtTypeReference


Examples of spoon.reflect.reference.CtTypeReference

    if (!type.isFree()) {
      SymbolicInstance i = types.get(type.getName());
      result = i.getConcreteType().equals(curInst.getConcreteType());
    }
    if (type.getBound() != null) {
      CtTypeReference r = curInst.getConcreteType().getFactory().Type()
          .createReference(type.getBound().getName().getValue());
      result = curInst.getConcreteType().isSubtypeOf(r);
    }
    if (result && type.getBinding() != null) {
      types.put(type.getBinding(), curInst);
View Full Code Here

Examples of spoon.reflect.reference.CtTypeReference

  @Test
  public void VisitPrimitiveTypeReferenceTest1(){
    try {
      clearMappings();
     
      CtTypeReference typeRef = launcher.getFactory().Type().createReference(java.lang.String.class.getName());
      scanner.visitCtTypeReference(typeRef);
      assertTrue(scanner.nodeDataStack.peek().xsdTypeQName != null);
      assertTrue(scanner.nodeDataStack.peek().xsdTypeQName.getNamespaceURI().equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001));
      assertTrue(scanner.nodeDataStack.peek().xsdTypeQName.getLocalPart().equals("string"));
     
View Full Code Here

Examples of spoon.reflect.reference.CtTypeReference

      CtPackage ctPackage = launcher.getFactory().Package().getOrCreate("com.example");
      CtClass ctClass = launcher.getFactory().Class().create("com.example.TestClass1");
      ctPackage.getTypes().add(ctClass);
      HashSet<ModifierKind> modifiers = new HashSet<ModifierKind>();
      modifiers.add(ModifierKind.PUBLIC);
      CtTypeReference ctTypeRef = launcher.getFactory().Type().createReference(String.class.getName());
      @SuppressWarnings("unused")
      CtField ctField = launcher.getFactory().Field().create(ctClass, modifiers, ctTypeRef, "myField");
      scanner.visitCtPackage(ctPackage);     
     
      XSDComplexTypeDefinition complexType = scanner.typeXSDComplexTypeMap.get(ctClass);
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.