Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
8cfe3bfc
D
dragonwell8_langtools
项目概览
openanolis
/
dragonwell8_langtools
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_langtools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8cfe3bfc
编写于
12月 17, 2012
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8004961: rename Plugin.call to Plugin.init
Reviewed-by: mcimadamore
上级
d1df4972
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
24 deletion
+23
-24
src/share/classes/com/sun/source/util/Plugin.java
src/share/classes/com/sun/source/util/Plugin.java
+2
-2
src/share/classes/com/sun/tools/javac/main/Main.java
src/share/classes/com/sun/tools/javac/main/Main.java
+1
-1
test/tools/javac/plugin/showtype/ShowTypePlugin.java
test/tools/javac/plugin/showtype/ShowTypePlugin.java
+1
-1
test/tools/javac/plugin/showtype/Test.java
test/tools/javac/plugin/showtype/Test.java
+19
-20
未找到文件。
src/share/classes/com/sun/source/util/Plugin.java
浏览文件 @
8cfe3bfc
...
@@ -56,9 +56,9 @@ public interface Plugin {
...
@@ -56,9 +56,9 @@ public interface Plugin {
String
getName
();
String
getName
();
/**
/**
* In
vok
e the plug-in for a given compilation task.
* In
itializ
e the plug-in for a given compilation task.
* @param task The compilation task that has just been started
* @param task The compilation task that has just been started
* @param args Arguments, if any, for the plug-in
* @param args Arguments, if any, for the plug-in
*/
*/
void
call
(
JavacTask
task
,
String
...
args
);
void
init
(
JavacTask
task
,
String
...
args
);
}
}
src/share/classes/com/sun/tools/javac/main/Main.java
浏览文件 @
8cfe3bfc
...
@@ -448,7 +448,7 @@ public class Main {
...
@@ -448,7 +448,7 @@ public class Main {
try
{
try
{
if
(
task
==
null
)
if
(
task
==
null
)
task
=
JavacTask
.
instance
(
pEnv
);
task
=
JavacTask
.
instance
(
pEnv
);
plugin
.
call
(
task
,
p
.
tail
.
toArray
(
new
String
[
p
.
tail
.
size
()]));
plugin
.
init
(
task
,
p
.
tail
.
toArray
(
new
String
[
p
.
tail
.
size
()]));
}
catch
(
Throwable
ex
)
{
}
catch
(
Throwable
ex
)
{
if
(
apiMode
)
if
(
apiMode
)
throw
new
RuntimeException
(
ex
);
throw
new
RuntimeException
(
ex
);
...
...
test/tools/javac/plugin/showtype/ShowTypePlugin.java
浏览文件 @
8cfe3bfc
...
@@ -41,7 +41,7 @@ public class ShowTypePlugin implements Plugin {
...
@@ -41,7 +41,7 @@ public class ShowTypePlugin implements Plugin {
return
"showtype"
;
return
"showtype"
;
}
}
public
void
call
(
JavacTask
task
,
String
...
args
)
{
public
void
init
(
JavacTask
task
,
String
...
args
)
{
Pattern
pattern
=
null
;
Pattern
pattern
=
null
;
if
(
args
.
length
==
1
)
if
(
args
.
length
==
1
)
pattern
=
Pattern
.
compile
(
args
[
0
]);
pattern
=
Pattern
.
compile
(
args
[
0
]);
...
...
test/tools/javac/plugin/showtype/Test.java
浏览文件 @
8cfe3bfc
import
java.io.File
;
import
java.io.FileWriter
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
import
java.nio.charset.Charset
;
import
java.nio.file.Files
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Locale
;
import
java.util.Objects
;
import
javax.tools.JavaCompiler
;
import
javax.tools.JavaFileManager
;
import
javax.tools.JavaFileObject
;
import
javax.tools.StandardJavaFileManager
;
import
javax.tools.StandardLocation
;
import
javax.tools.ToolProvider
;
/*
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
...
@@ -42,10 +23,28 @@ import javax.tools.ToolProvider;
...
@@ -42,10 +23,28 @@ import javax.tools.ToolProvider;
/**
/**
* @test
* @test
* @bug 8001098
* @bug 8001098
8004961
* @summary Provide a simple light-weight "plug-in" mechanism for javac
* @summary Provide a simple light-weight "plug-in" mechanism for javac
*/
*/
import
java.io.File
;
import
java.io.FileWriter
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
import
java.nio.charset.Charset
;
import
java.nio.file.Files
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Locale
;
import
java.util.Objects
;
import
javax.tools.JavaCompiler
;
import
javax.tools.JavaFileManager
;
import
javax.tools.JavaFileObject
;
import
javax.tools.StandardJavaFileManager
;
import
javax.tools.StandardLocation
;
import
javax.tools.ToolProvider
;
public
class
Test
{
public
class
Test
{
public
static
void
main
(
String
...
args
)
throws
Exception
{
public
static
void
main
(
String
...
args
)
throws
Exception
{
new
Test
().
run
();
new
Test
().
run
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录