org.eclipse.jdt.internal.compiler.parser.Parser.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(8.6k)|赞(0)|评价(0)|浏览(221)

本文整理了Java中org.eclipse.jdt.internal.compiler.parser.Parser.<init>()方法的一些代码示例,展示了Parser.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.<init>()方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.parser.Parser
类名称:Parser
方法名:<init>

Parser.<init>介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

private Expression parseMemberValue(char[] memberValue) {
    // memberValue must not be null
    if (this.parser == null) {
      this.parser = new Parser(this.problemReporter, true);
    }
    return this.parser.parseMemberValue(memberValue, 0, memberValue.length, this.unit);
  }
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

private Expression parseMemberValue(char[] memberValue) {
    // memberValue must not be null
    if (this.parser == null) {
      this.parser = new Parser(this.problemReporter, true);
    }
    return this.parser.parseMemberValue(memberValue, 0, memberValue.length, this.unit);
  }
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

private Expression parseMemberValue(char[] memberValue) {
    // memberValue must not be null
    if (this.parser == null) {
      this.parser = new Parser(this.problemReporter, true);
    }
    return this.parser.parseMemberValue(memberValue, 0, memberValue.length, this.unit);
  }
}

代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps

private Expression parseMemberValue(char[] memberValue) {
    // memberValue must not be null
    if (this.parser == null) {
      this.parser = new Parser(this.problemReporter, true);
    }
    return this.parser.parseMemberValue(memberValue, 0, memberValue.length, this.unit);
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private Expression parseMemberValue(char[] memberValue) {
    // memberValue must not be null
    if (this.parser == null) {
      this.parser = new Parser(this.problemReporter, true);
    }
    return this.parser.parseMemberValue(memberValue, 0, memberValue.length, this.unit);
  }
}

代码示例来源:origin: org.projectlombok/lombok.ast

private static Parser makeDummyParser(ProblemReporter reporter, String mainTypeName) {
  Parser parser = new Parser(reporter, false);
  CompilationResult cr = new CompilationResult((mainTypeName + ".java").toCharArray(), 0, 1, 0);
  parser.compilationUnit = new CompilationUnitDeclaration(reporter, cr, 0);
  return parser;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

private CompilationUnitDeclaration convert(IModule module, CompilationResult compilationResult) throws JavaModelException {
  this.unit = new CompilationUnitDeclaration(this.problemReporter, compilationResult, 0);
  // not filled at this point
  ModuleDescriptionInfo moduleInfo = (ModuleDescriptionInfo) module;
  org.eclipse.jdt.core.ICompilationUnit cuHandle = moduleInfo.getHandle().getCompilationUnit();
  this.cu = (ICompilationUnit) cuHandle;
  // always parse, because (a) dietParse is always sufficient, (b) we don't yet have the necessary conversion methods for module directives 
  return new Parser(this.problemReporter, true).dietParse(this.cu, compilationResult);
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

private Parser basicParser() {
  if (this.basicParser == null) {
    ProblemReporter problemReporter =
      new ProblemReporter(
        DefaultErrorHandlingPolicies.proceedWithAllProblems(),
        this.options,
        new DefaultProblemFactory());
    this.basicParser = new Parser(problemReporter, false);
    this.basicParser.reportOnlyOneSyntaxError = true;
  }
  return this.basicParser;
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

protected Parser basicParser() {
  if (this.basicParser == null) {
    ProblemReporter problemReporter =
      new ProblemReporter(
        DefaultErrorHandlingPolicies.proceedWithAllProblems(),
        this.options,
        new DefaultProblemFactory());
    this.basicParser = new Parser(problemReporter, false);
    this.basicParser.reportOnlyOneSyntaxError = true;
  }
  return this.basicParser;
}
/*

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

protected Parser basicParser() {
  if (this.basicParser == null) {
    ProblemReporter problemReporter =
      new ProblemReporter(
        DefaultErrorHandlingPolicies.proceedWithAllProblems(),
        this.options,
        new DefaultProblemFactory());
    this.basicParser = new Parser(problemReporter, false);
    this.basicParser.reportOnlyOneSyntaxError = true;
  }
  return this.basicParser;
}
/*

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

private Parser getParser() {
  Map<String,String> opts = new HashMap<String, String>();
  opts.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_9);
  return new Parser(
      new ProblemReporter(DefaultErrorHandlingPolicies.exitOnFirstError(), new CompilerOptions(opts), new DefaultProblemFactory(Locale.getDefault())),
      false);
}
@Override

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

private Parser getParser() {
  Map<String,String> opts = new HashMap<String, String>();
  opts.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_9);
  return new Parser(
      new ProblemReporter(DefaultErrorHandlingPolicies.exitOnFirstError(), new CompilerOptions(opts), new DefaultProblemFactory(Locale.getDefault())),
      false);
}
@Override

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private ReferenceExpression copy() {
  final Parser parser = new Parser(this.enclosingScope.problemReporter(), false);
  final ICompilationUnit compilationUnit = this.compilationResult.getCompilationUnit();
  final char[] source = compilationUnit != null ? compilationUnit.getContents() : this.text;
  ReferenceExpression copy =  (ReferenceExpression) parser.parseExpression(source, compilationUnit != null ? this.sourceStart : 0, this.sourceEnd - this.sourceStart + 1, 
                  this.enclosingScope.referenceCompilationUnit(), false /* record line separators */);
  copy.original = this;
  copy.sourceStart = this.sourceStart;
  copy.sourceEnd = this.sourceEnd;
  return copy;
}

代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj

private ReferenceExpression copy() {
  final Parser parser = new Parser(this.enclosingScope.problemReporter(), false);
  final ICompilationUnit compilationUnit = this.compilationResult.getCompilationUnit();
  final char[] source = compilationUnit != null ? compilationUnit.getContents() : this.text;
  ReferenceExpression copy =  (ReferenceExpression) parser.parseExpression(source, compilationUnit != null ? this.sourceStart : 0, this.sourceEnd - this.sourceStart + 1, 
                  this.enclosingScope.referenceCompilationUnit(), false /* record line separators */);
  copy.original = this;
  copy.sourceStart = this.sourceStart;
  copy.sourceEnd = this.sourceEnd;
  return copy;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

private ReferenceExpression copy() {
  final Parser parser = new Parser(this.enclosingScope.problemReporter(), false);
  final ICompilationUnit compilationUnit = this.compilationResult.getCompilationUnit();
  final char[] source = compilationUnit != null ? compilationUnit.getContents() : this.text;
  parser.scanner = this.scanner;
  ReferenceExpression copy =  (ReferenceExpression) parser.parseExpression(source, compilationUnit != null ? this.sourceStart : 0, this.sourceEnd - this.sourceStart + 1, 
                  this.enclosingScope.referenceCompilationUnit(), false /* record line separators */);
  copy.original = this;
  copy.sourceStart = this.sourceStart;
  copy.sourceEnd = this.sourceEnd;
  return copy;
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

private ReferenceExpression copy() {
  final Parser parser = new Parser(this.enclosingScope.problemReporter(), false);
  final ICompilationUnit compilationUnit = this.compilationResult.getCompilationUnit();
  final char[] source = compilationUnit != null ? compilationUnit.getContents() : this.text;
  parser.scanner = this.scanner;
  ReferenceExpression copy =  (ReferenceExpression) parser.parseExpression(source, compilationUnit != null ? this.sourceStart : 0, this.sourceEnd - this.sourceStart + 1, 
                  this.enclosingScope.referenceCompilationUnit(), false /* record line separators */);
  copy.original = this;
  copy.sourceStart = this.sourceStart;
  copy.sourceEnd = this.sourceEnd;
  return copy;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

private Parser getParser() {
  if (this.parser == null) {
    this.compilerOptions = new CompilerOptions(JavaCore.getOptions());
    ProblemReporter problemReporter =
      new ProblemReporter(
        DefaultErrorHandlingPolicies.proceedWithAllProblems(),
        this.compilerOptions,
        new DefaultProblemFactory());
    this.parser = new Parser(problemReporter, true);
  }
  return this.parser;
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

private Parser getParser() {
  if (this.parser == null) {
    this.compilerOptions = new CompilerOptions(JavaCore.getOptions());
    ProblemReporter problemReporter =
      new ProblemReporter(
        DefaultErrorHandlingPolicies.proceedWithAllProblems(),
        this.compilerOptions,
        new DefaultProblemFactory());
    this.parser = new Parser(problemReporter, true);
  }
  return this.parser;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

private Parser getNewParser() {
  return new Parser(new ProblemReporter(getHandlingPolicy(), 
      new CompilerOptions(this.options), getProblemFactory()), false);
}
private IModule extractModuleDesc(String fileName) {

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

private Parser getNewParser() {
  return new Parser(new ProblemReporter(getHandlingPolicy(), 
      new CompilerOptions(this.options), getProblemFactory()), false);
}
private IModule extractModuleDesc(String fileName) {

相关文章

Parser类方法