本文整理汇总了Java中com.google.javascript.jscomp.DefinitionsRemover.Definition.remove方法的典型用法代码示例。如果您正苦于以下问题:Java Definition.remove方法的具体用法?Java Definition.remove怎么用?Java Definition.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.javascript.jscomp.DefinitionsRemover.Definition
的用法示例。
在下文中一共展示了Definition.remove方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getProcessor
import com.google.javascript.jscomp.DefinitionsRemover.Definition; //导入方法依赖的package包/类
@Override
protected CompilerPass getProcessor(final Compiler compiler) {
// Create a pass that removes all the definitions.
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
DefinitionsGatherer g = new DefinitionsGatherer();
(new NodeTraversal(compiler, g)).traverse(root);
for (Definition def : g.definitions) {
def.remove();
compiler.reportCodeChange();
}
}
};
}
示例2: getProcessor
import com.google.javascript.jscomp.DefinitionsRemover.Definition; //导入方法依赖的package包/类
@Override
protected CompilerPass getProcessor(final Compiler compiler) {
// Create a pass that removes all the definitions.
return (Node externs, Node root) -> {
DefinitionsGatherer definitionsGatherer = new DefinitionsGatherer();
NodeTraversal.traverseEs6(compiler, root, definitionsGatherer);
for (Definition def : definitionsGatherer.definitions) {
def.remove(compiler);
}
};
}
示例3: remove
import com.google.javascript.jscomp.DefinitionsRemover.Definition; //导入方法依赖的package包/类
/** Removes all of the declarations of this name. */
public void remove() {
for (Definition declaration : getDeclarations()) {
declaration.remove();
}
}
示例4: remove
import com.google.javascript.jscomp.DefinitionsRemover.Definition; //导入方法依赖的package包/类
/** Removes all of the declarations of this name. */
public final void remove() {
for (Definition declaration : getDeclarations()) {
declaration.remove();
}
}