Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
e2b7cba8
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看板
提交
e2b7cba8
编写于
5月 03, 2013
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8000407: remove @GenerateNativeHeader
Reviewed-by: vromero, darcy
上级
ada301b8
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
4 addition
and
173 deletion
+4
-173
src/share/classes/com/sun/tools/javac/code/Symtab.java
src/share/classes/com/sun/tools/javac/code/Symtab.java
+0
-2
src/share/classes/com/sun/tools/javac/jvm/JNIWriter.java
src/share/classes/com/sun/tools/javac/jvm/JNIWriter.java
+0
-7
src/share/classes/javax/tools/annotation/GenerateNativeHeader.java
.../classes/javax/tools/annotation/GenerateNativeHeader.java
+0
-47
test/tools/javac/nativeHeaders/NativeHeaderTest.java
test/tools/javac/nativeHeaders/NativeHeaderTest.java
+2
-25
test/tools/javac/nativeHeaders/javahComparison/CompareTest.java
...ools/javac/nativeHeaders/javahComparison/CompareTest.java
+2
-2
test/tools/javac/nativeHeaders/javahComparison/TestClass2.java
...tools/javac/nativeHeaders/javahComparison/TestClass2.java
+0
-36
test/tools/javac/nativeHeaders/javahComparison/TestClass3.java
...tools/javac/nativeHeaders/javahComparison/TestClass3.java
+0
-54
未找到文件。
src/share/classes/com/sun/tools/javac/code/Symtab.java
浏览文件 @
e2b7cba8
...
...
@@ -131,7 +131,6 @@ public class Symtab {
public
final
Type
methodHandleLookupType
;
public
final
Type
methodTypeType
;
public
final
Type
nativeHeaderType
;
public
final
Type
nativeHeaderType_old
;
public
final
Type
throwableType
;
public
final
Type
errorType
;
public
final
Type
interruptedExceptionType
;
...
...
@@ -526,7 +525,6 @@ public class Symtab {
autoCloseableType
.
tsym
);
trustMeType
=
enterClass
(
"java.lang.SafeVarargs"
);
nativeHeaderType
=
enterClass
(
"java.lang.annotation.Native"
);
nativeHeaderType_old
=
enterClass
(
"javax.tools.annotation.GenerateNativeHeader"
);
lambdaMetafactory
=
enterClass
(
"java.lang.invoke.LambdaMetafactory"
);
functionalInterfaceType
=
enterClass
(
"java.lang.FunctionalInterface"
);
...
...
src/share/classes/com/sun/tools/javac/jvm/JNIWriter.java
浏览文件 @
e2b7cba8
...
...
@@ -157,13 +157,6 @@ public class JNIWriter {
if
(
c
.
isLocal
()
||
(
c
.
flags
()
&
Flags
.
SYNTHETIC
)
!=
0
)
return
false
;
/* temporary code for backwards compatibility */
for
(
Attribute
.
Compound
a:
c
.
annotations
.
getDeclarationAttributes
())
{
if
(
a
.
type
.
tsym
==
syms
.
nativeHeaderType_old
.
tsym
)
return
true
;
}
/* end of temporary code for backwards compatibility */
for
(
Scope
.
Entry
i
=
c
.
members_field
.
elems
;
i
!=
null
;
i
=
i
.
sibling
)
{
if
(
i
.
sym
.
kind
==
Kinds
.
MTH
&&
(
i
.
sym
.
flags
()
&
Flags
.
NATIVE
)
!=
0
)
return
true
;
...
...
src/share/classes/javax/tools/annotation/GenerateNativeHeader.java
已删除
100644 → 0
浏览文件 @
ada301b8
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
javax.tools.annotation
;
import
java.lang.annotation.*
;
import
static
java
.
lang
.
annotation
.
RetentionPolicy
.*;
import
static
java
.
lang
.
annotation
.
ElementType
.*;
/**
* An annotation used to indicate that a native header file
* should be generated for this class.
*
* Normally, the presence of native methods is a sufficient
* indication of the need for a native header file. However,
* in some cases, a class may contain constants of interest to
* native code, without containing any native methods.
*
* @since 1.8
*/
@Documented
@Target
(
TYPE
)
@Retention
(
SOURCE
)
public
@interface
GenerateNativeHeader
{
}
test/tools/javac/nativeHeaders/NativeHeaderTest.java
浏览文件 @
e2b7cba8
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012,
2013,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -23,7 +23,7 @@
/*
* @test
* @bug 7150368 8003412
* @bug 7150368 8003412
8000407
* @summary javac should include basic ability to generate native headers
*/
...
...
@@ -124,17 +124,6 @@ public class NativeHeaderTest {
createSet
(
classesDir
.
list
()));
}
@Test
void
oldAnnoTest
(
RunKind
rk
,
GenKind
gk
)
throws
Exception
{
List
<
File
>
files
=
new
ArrayList
<
File
>();
files
.
add
(
createFile
(
"p/C.java"
,
"@javax.tools.annotation.GenerateNativeHeader class C { }"
));
Set
<
String
>
expect
=
createSet
(
"C.h"
);
test
(
rk
,
gk
,
files
,
expect
);
}
@Test
void
annoTest
(
RunKind
rk
,
GenKind
gk
)
throws
Exception
{
List
<
File
>
files
=
new
ArrayList
<
File
>();
...
...
@@ -146,18 +135,6 @@ public class NativeHeaderTest {
test
(
rk
,
gk
,
files
,
expect
);
}
@Test
void
oldAnnoNestedClassTest
(
RunKind
rk
,
GenKind
gk
)
throws
Exception
{
List
<
File
>
files
=
new
ArrayList
<
File
>();
files
.
add
(
createFile
(
"p/C.java"
,
"class C { @javax.tools.annotation.GenerateNativeHeader class Inner { } }"
));
Set
<
String
>
expect
=
createSet
(
"C_Inner.h"
);
if
(
gk
==
GenKind
.
FULL
)
expect
.
add
(
"C.h"
);
test
(
rk
,
gk
,
files
,
expect
);
}
@Test
void
annoNestedClassTest
(
RunKind
rk
,
GenKind
gk
)
throws
Exception
{
List
<
File
>
files
=
new
ArrayList
<
File
>();
...
...
test/tools/javac/nativeHeaders/javahComparison/CompareTest.java
浏览文件 @
e2b7cba8
/*
* Copyright (c) 2007, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -23,7 +23,7 @@
/*
* @test
* @bug 7150368 8003412
* @bug 7150368 8003412
8000407
* @summary javac should include basic ability to generate native headers
*/
...
...
test/tools/javac/nativeHeaders/javahComparison/TestClass2.java
已删除
100644 → 0
浏览文件 @
ada301b8
/*
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import
javax.tools.annotation.GenerateNativeHeader
;
@GenerateNativeHeader
public
class
TestClass2
{
byte
b
;
short
s
;
int
i
;
long
l
;
float
f
;
double
d
;
Object
o
;
String
t
;
}
test/tools/javac/nativeHeaders/javahComparison/TestClass3.java
已删除
100644 → 0
浏览文件 @
ada301b8
/*
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import
javax.tools.annotation.GenerateNativeHeader
;
@GenerateNativeHeader
public
class
TestClass3
{
public
int
tc3
;
public
class
Inner1
{
public
int
tc3i1
;
public
class
Inner1A
{
public
int
tc3i1i1a
;
}
public
class
Inner1B
{
public
int
tc3i1i1b
;
}
}
public
class
Inner2
{
public
int
tc321
;
public
class
Inner2A
{
public
int
tc3i2i2a
;
}
public
class
Inner2B
{
public
int
tc3i2i2b
;
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录