| java.lang.Object org.netbeans.modules.java.hints.spi.support.FixFactory
FixFactory | final public class FixFactory (Code) | | Factory for creating fixes, which add @SuppresWarning to given Element
author: Petr Hrebejk |
Method Summary | |
public static Fix | createSuppressWarnings(CompilationInfo compilationInfo, TreePath treePath, String... keys) Creates a fix, which when invoked adds @SuppresWarnings(keys) to
nearest declaration.
Parameters: compilationInfo - CompilationInfo to work on Parameters: treePath - TreePath to a tree. |
createSuppressWarnings | public static Fix createSuppressWarnings(CompilationInfo compilationInfo, TreePath treePath, String... keys)(Code) | | Creates a fix, which when invoked adds @SuppresWarnings(keys) to
nearest declaration.
Parameters: compilationInfo - CompilationInfo to work on Parameters: treePath - TreePath to a tree. The method will find nearest outerdecaration. (type, method, field or local variable) Parameters: keys - keys to be contained in the SuppresWarnings annotation. E.g. "key" ) or @SuppresWarnings( {"key1", "key2", ..., "keyN" } ). throws: IllegalArgumentException - if keys are null or empty or id no suitable element to put the annotation on is found (e.g. if TreePath to CompilationUnit is given") |
|
|