Package com.google.java.contract.core.util

Examples of com.google.java.contract.core.util.SyntheticJavaFile


        new ArrayList<SyntheticJavaFile>(types.size());
    if (success) {
      for (TypeModel type : types) {
        ContractWriter writer = new ContractWriter(debug);
        type.accept(writer);
        sources.add(new SyntheticJavaFile(type.getName().getBinaryName(),
                                          writer.toByteArray(),
                                          writer.getLineNumberMap()));
      }

      if (dump) {
View Full Code Here


                             List<SyntheticJavaFile> sources) {
    Iterator<TypeModel> itType = types.iterator();
    Iterator<SyntheticJavaFile> itFile = sources.iterator();
    while (itType.hasNext() && itFile.hasNext()) {
      TypeModel type = itType.next();
      SyntheticJavaFile file = itFile.next();
      DebugUtils.dump(type.getName().getBinaryName(),
                      file.getCharContent(true).toString().getBytes(),
                      Kind.SOURCE);
    }
  }
View Full Code Here

    protected AnnotationSourceInfo getSourceInfo() {
      JavaFileObject source = diagnostic.getSource();
      if (!(source instanceof SyntheticJavaFile)) {
        return null;
      }
      SyntheticJavaFile synthSource = (SyntheticJavaFile) source;
      Object info = synthSource.getSourceInfo(diagnostic.getLineNumber());
      if (!(info instanceof AnnotationSourceInfo)) {
        return null;
      }
      return (AnnotationSourceInfo) info;
    }
View Full Code Here

TOP

Related Classes of com.google.java.contract.core.util.SyntheticJavaFile

Copyright © 2018 www.massapicom. 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.