src/jdk.compiler/share/classes/com/sun/source/util/JavacTask.java
changeset 54514 b0651dcc8d98
parent 47216 71c04702a3d5
equal deleted inserted replaced
54513:2fd0422ac495 54514:b0651dcc8d98
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    27 
    27 
    28 import java.io.IOException;
    28 import java.io.IOException;
    29 
    29 
    30 import javax.annotation.processing.ProcessingEnvironment;
    30 import javax.annotation.processing.ProcessingEnvironment;
    31 import javax.lang.model.element.Element;
    31 import javax.lang.model.element.Element;
       
    32 import javax.lang.model.element.VariableElement;
    32 import javax.lang.model.type.TypeMirror;
    33 import javax.lang.model.type.TypeMirror;
    33 import javax.lang.model.util.Elements;
    34 import javax.lang.model.util.Elements;
    34 import javax.lang.model.util.Types;
    35 import javax.lang.model.util.Types;
    35 import javax.tools.JavaCompiler.CompilationTask;
    36 import javax.tools.JavaCompiler.CompilationTask;
    36 import javax.tools.JavaFileObject;
    37 import javax.tools.JavaFileObject;
   135      * @since 1.8
   136      * @since 1.8
   136      */
   137      */
   137     public abstract void removeTaskListener(TaskListener taskListener);
   138     public abstract void removeTaskListener(TaskListener taskListener);
   138 
   139 
   139     /**
   140     /**
       
   141      * Sets the specified {@link ParameterNameProvider}. It may be used when
       
   142      * {@link VariableElement#getSimpleName()} is called for a method parameter
       
   143      * for which an authoritative name is not found. The given
       
   144      * {@code ParameterNameProvider} may infer a user-friendly name
       
   145      * for the method parameter.
       
   146      *
       
   147      * Setting a new {@code ParameterNameProvider} will clear any previously set
       
   148      * {@code ParameterNameProvider}, which won't be queried any more.
       
   149      *
       
   150      * When no {@code ParameterNameProvider} is set, or when it returns null from
       
   151      * {@link ParameterNameProvider#getParameterName(javax.lang.model.element.VariableElement)},
       
   152      * an automatically synthesized name is returned from {@code VariableElement.getSimpleName()}.
       
   153      *
       
   154      * @implSpec The default implementation of this method does nothing.
       
   155      *
       
   156      * @param provider the provider.
       
   157      * @since 13
       
   158      */
       
   159     public void setParameterNameProvider(ParameterNameProvider provider) {}
       
   160 
       
   161     /**
   140      * Returns a type mirror of the tree node determined by the specified path.
   162      * Returns a type mirror of the tree node determined by the specified path.
   141      * This method has been superceded by methods on
   163      * This method has been superceded by methods on
   142      * {@link com.sun.source.util.Trees Trees}.
   164      * {@link com.sun.source.util.Trees Trees}.
   143      *
   165      *
   144      * @param path the path
   166      * @param path the path