Examples of CompilerOptions


Examples of org.apache.axis2.schema.CompilerOptions

   
    /* compile schema */
    Map<QName, Document> modelMap;
    Map<QName, String> elementMap;
    try {
      CompilerOptions options = new CompilerOptions();
      SchemaCompiler schemaCompiler = new SchemaCompiler(options);
      schemaCompiler.compile(axisService.getSchema());
      modelMap = schemaCompiler.getProcessedModelMap();
      elementMap = schemaCompiler.getProcessedElementMap();
    } catch (SchemaCompilationException e) {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions

  // NOTE: from target 1.2 on, method's declaring class is touched if any different from receiver type
  // and not from Object or implicit static method call. 
  if (this.binding.declaringClass != this.actualReceiverType
      && this.receiverGenericCast == null
      && !this.actualReceiverType.isArrayType()) {
    CompilerOptions options = currentScope.compilerOptions();
    if ((options.targetJDK >= ClassFileConstants.JDK1_2
        && (options.complianceLevel >= ClassFileConstants.JDK1_4 || !(this.receiver.isImplicitThis() && this.codegenBinding.isStatic()))
        && this.binding.declaringClass.id != TypeIds.T_JavaLangObject) // no change for Object methods
      || !this.binding.declaringClass.canBeSeenBy(currentScope)) {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions

        closestMatchOriginal.modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
      }
    }
    return this.resolvedType;
  }
  final CompilerOptions compilerOptions = scope.compilerOptions();
  if (!this.binding.isStatic()) {
    // the "receiver" must not be a type, in other words, a NameReference that the TC has bound to a Type
    if (receiverIsType) {
      scope.problemReporter().mustUseAStaticMethod(this, this.binding);
      if (this.actualReceiverType.isRawType()
          && (this.receiver.bits & ASTNode.IgnoreRawTypeCheck) == 0
          && compilerOptions.getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore) {
        scope.problemReporter().rawTypeReference(this.receiver, this.actualReceiverType);
      }
    } else {
      this.receiver.computeConversion(scope, this.actualReceiverType, this.actualReceiverType);
      // compute generic cast if necessary
      TypeBinding receiverErasure = this.actualReceiverType.erasure();
      if (receiverErasure instanceof ReferenceBinding) {
        if (receiverErasure.findSuperTypeWithSameErasure(this.binding.declaringClass) == null) {
          this.receiverGenericCast = this.binding.declaringClass; // handle indirect inheritance thru variable secondary bound
        }
      }
    }
  } else {
    // static message invoked through receiver? legal but unoptimal (optional warning).
    if (!(this.receiver.isImplicitThis() || this.receiver.isSuper() || receiverIsType)) {
      scope.problemReporter().nonStaticAccessToStaticMethod(this, this.binding);
    }
    if (!this.receiver.isImplicitThis() && this.binding.declaringClass != this.actualReceiverType) {
      scope.problemReporter().indirectAccessToStaticMethod(this, this.binding);
    }   
  }
  checkInvocationArguments(scope, this.receiver, this.actualReceiverType, this.binding, this.arguments, argumentTypes, argsContainCast, this);

  //-------message send that are known to fail at compile time-----------
  if (this.binding.isAbstract()) {
    if (this.receiver.isSuper()) {
      scope.problemReporter().cannotDireclyInvokeAbstractMethod(this, this.binding);
    }
    // abstract private methods cannot occur nor abstract static............
  }
  if (isMethodUseDeprecated(this.binding, scope, true))
    scope.problemReporter().deprecatedMethod(this.binding, this);

  // from 1.5 compliance on, array#clone() returns the array type (but binding still shows Object)
  if (this.actualReceiverType.isArrayType()
      && this.binding.parameters == Binding.NO_PARAMETERS
      && compilerOptions.complianceLevel >= ClassFileConstants.JDK1_5
      && CharOperation.equals(this.binding.selector, TypeConstants.CLONE)) {
    this.resolvedType = this.actualReceiverType;
  } else {
    TypeBinding returnType = this.binding.returnType;
    if (returnType != null) returnType = returnType.capture(scope, this.sourceEnd);
    this.resolvedType = returnType;
  }
  if (this.receiver.isSuper() && compilerOptions.getSeverity(CompilerOptions.OverridingMethodWithoutSuperInvocation) != ProblemSeverities.Ignore) {
    final ReferenceContext referenceContext = scope.methodScope().referenceContext;
    if (referenceContext instanceof AbstractMethodDeclaration) {
      final AbstractMethodDeclaration abstractMethodDeclaration = (AbstractMethodDeclaration) referenceContext;
      MethodBinding enclosingMethodBinding = abstractMethodDeclaration.binding;
      if (enclosingMethodBinding.isOverriding()
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions

  if (this.binding.declaringClass != someReceiverType
      && !someReceiverType.isArrayType()
      && this.binding.declaringClass != null // array.length
      && this.binding.constant() == Constant.NotAConstant) {
 
    CompilerOptions options = currentScope.compilerOptions();
    if ((options.targetJDK >= ClassFileConstants.JDK1_2
        && (options.complianceLevel >= ClassFileConstants.JDK1_4 || !receiver.isImplicitThis() || !this.codegenBinding.isStatic())
        && this.binding.declaringClass.id != T_JavaLangObject) // no change for Object fields
      || !this.binding.declaringClass.canBeSeenBy(currentScope)) {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions

    // If modified, also modify the method JavaModelManager#getDefaultOptionsNoInitialization()
    // Get options names set
    HashSet optionNames = JavaModelManager.getJavaModelManager().optionNames;
   
    // Compiler settings
    Map defaultOptionsMap = new CompilerOptions().getMap(); // compiler defaults
   
    // Override some compiler defaults
    defaultOptionsMap.put(JavaCore.COMPILER_LOCAL_VARIABLE_ATTR, JavaCore.GENERATE);
    defaultOptionsMap.put(JavaCore.COMPILER_CODEGEN_UNUSED_LOCAL, JavaCore.PRESERVE);
    defaultOptionsMap.put(JavaCore.COMPILER_TASK_TAGS, JavaCore.DEFAULT_TASK_TAGS);
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions

    // and not from Object or implicit static field access. 
    if (fieldBinding.declaringClass != lastReceiverType
        && !lastReceiverType.isArrayType()
        && fieldBinding.declaringClass != null // array.length
        && fieldBinding.constant() == Constant.NotAConstant) {
      CompilerOptions options = currentScope.compilerOptions();
      if ((options.targetJDK >= ClassFileConstants.JDK1_2
          && (options.complianceLevel >= ClassFileConstants.JDK1_4 || (index < 0 ? fieldBinding != binding : index > 0) || this.indexOfFirstFieldBinding > 1 || !fieldBinding.isStatic())
          && fieldBinding.declaringClass.id != T_JavaLangObject) // no change for Object fields
        || !(useDelegate
            ? new CodeSnippetScope(currentScope).canBeSeenByForCodeSnippet(fieldBinding.declaringClass, (ReferenceBinding) this.delegateThis.type)
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions

protected abstract char[] getClassName();
/**
* Creates and returns a compiler for this evaluator.
*/
Compiler getCompiler(ICompilerRequestor compilerRequestor) {
  CompilerOptions compilerOptions = new CompilerOptions(this.options);
  compilerOptions.performMethodsFullRecovery = true;
  compilerOptions.performStatementsRecovery = true;
  return new Compiler(
    this.environment,
    DefaultErrorHandlingPolicies.exitAfterAllProblems(),
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions

  this.logger = new Logger(this, outWriter, errWriter);
  this.proceed = true;
  this.out = outWriter;
  this.err = errWriter;
  this.systemExitWhenFinished = systemExit;
  this.options = new CompilerOptions().getMap();
  if (customDefaultOptions != null) {
    this.didSpecifySource = customDefaultOptions.get(CompilerOptions.OPTION_Source) != null;
    this.didSpecifyTarget = customDefaultOptions.get(CompilerOptions.OPTION_TargetPlatform) != null;
    for (Iterator iter = customDefaultOptions.entrySet().iterator(); iter.hasNext();) {
      Map.Entry entry = (Map.Entry) iter.next();
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions

public void performCompilation() throws InvalidInputException {

  this.startTime = System.currentTimeMillis();

  FileSystem environment = getLibraryAccess();
  this.compilerOptions = new CompilerOptions(this.options);
  this.compilerOptions.performMethodsFullRecovery = false;
  this.compilerOptions.performStatementsRecovery = false;
  this.batchCompiler =
    new Compiler(
      environment,
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions

}
/**
* Creates a new parser.
*/
protected SourceElementParser getParser(Map settings) {
  return new SourceElementParser(this, new DefaultProblemFactory(), new CompilerOptions(settings), false/*don't report local declarations*/, true/*optimize string literals*/);
}
 
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.