Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
0cc50630
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0cc50630
编写于
2月 20, 2009
作者:
D
darcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6460529: Provide mixin interfaces for getQualifiedName and getTypeParameters
Reviewed-by: jjg
上级
29c93cb5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
96 addition
and
19 deletion
+96
-19
langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java
...ses/com/sun/tools/javac/processing/PrintingProcessor.java
+4
-11
langtools/src/share/classes/javax/lang/model/element/ExecutableElement.java
...e/classes/javax/lang/model/element/ExecutableElement.java
+2
-2
langtools/src/share/classes/javax/lang/model/element/PackageElement.java
...hare/classes/javax/lang/model/element/PackageElement.java
+2
-4
langtools/src/share/classes/javax/lang/model/element/Parameterizable.java
...are/classes/javax/lang/model/element/Parameterizable.java
+45
-0
langtools/src/share/classes/javax/lang/model/element/QualifiedNameable.java
...e/classes/javax/lang/model/element/QualifiedNameable.java
+41
-0
langtools/src/share/classes/javax/lang/model/element/TypeElement.java
...c/share/classes/javax/lang/model/element/TypeElement.java
+2
-2
未找到文件。
langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java
浏览文件 @
0cc50630
...
...
@@ -125,7 +125,7 @@ public class PrintingProcessor extends AbstractProcessor {
return
this
;
defaultAction
(
e
,
true
);
printFormalTypeParameters
(
e
);
printFormalTypeParameters
(
e
,
true
);
switch
(
kind
)
{
case
CONSTRUCTOR:
...
...
@@ -207,7 +207,7 @@ public class PrintingProcessor extends AbstractProcessor {
writer
.
print
(
" "
);
writer
.
print
(
e
.
getSimpleName
());
printFormalTypeParameters
(
e
);
printFormalTypeParameters
(
e
,
false
);
// Print superclass information if informative
if
(
kind
==
CLASS
)
{
...
...
@@ -364,16 +364,9 @@ public class PrintingProcessor extends AbstractProcessor {
}
}
private
void
printFormalTypeParameters
(
ExecutableElement
executable
)
{
printFormalTypeParameters
(
executable
.
getTypeParameters
(),
true
);
}
private
void
printFormalTypeParameters
(
TypeElement
type
)
{
printFormalTypeParameters
(
type
.
getTypeParameters
(),
false
);
}
private
void
printFormalTypeParameters
(
List
<?
extends
TypeParameterElement
>
typeParams
,
private
void
printFormalTypeParameters
(
Parameterizable
e
,
boolean
pad
)
{
List
<?
extends
TypeParameterElement
>
typeParams
=
e
.
getTypeParameters
();
if
(
typeParams
.
size
()
>
0
)
{
writer
.
print
(
"<"
);
...
...
langtools/src/share/classes/javax/lang/model/element/ExecutableElement.java
浏览文件 @
0cc50630
/*
* Copyright 2005-200
6
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2005-200
9
Sun Microsystems, Inc. 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
...
...
@@ -40,7 +40,7 @@ import javax.lang.model.type.*;
* @see ExecutableType
* @since 1.6
*/
public
interface
ExecutableElement
extends
Element
{
public
interface
ExecutableElement
extends
Element
,
Parameterizable
{
/**
* Returns the formal type parameters of this executable
* in declaration order.
...
...
langtools/src/share/classes/javax/lang/model/element/PackageElement.java
浏览文件 @
0cc50630
/*
* Copyright 2005-200
6
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2005-200
9
Sun Microsystems, Inc. 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
...
...
@@ -25,7 +25,6 @@
package
javax.lang.model.element
;
/**
* Represents a package program element. Provides access to information
* about the package and its members.
...
...
@@ -36,8 +35,7 @@ package javax.lang.model.element;
* @see javax.lang.model.util.Elements#getPackageOf
* @since 1.6
*/
public
interface
PackageElement
extends
Element
{
public
interface
PackageElement
extends
Element
,
QualifiedNameable
{
/**
* Returns the fully qualified name of this package.
...
...
langtools/src/share/classes/javax/lang/model/element/Parameterizable.java
0 → 100644
浏览文件 @
0cc50630
/*
* Copyright 2009 Sun Microsystems, Inc. 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. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package
javax.lang.model.element
;
import
java.util.List
;
/**
* A mixin interface for an element that has type parameters.
*
* @author Joseph D. Darcy
* @since 1.7
*/
public
interface
Parameterizable
extends
Element
{
/**
* Returns the formal type parameters of the type element in
* declaration order.
*
* @return the formal type parameters, or an empty list
* if there are none
*/
List
<?
extends
TypeParameterElement
>
getTypeParameters
();
}
langtools/src/share/classes/javax/lang/model/element/QualifiedNameable.java
0 → 100644
浏览文件 @
0cc50630
/*
* Copyright 2009 Sun Microsystems, Inc. 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. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package
javax.lang.model.element
;
/**
* A mixin interface for an element that has a qualified name.
*
* @author Joseph D. Darcy
* @since 1.7
*/
public
interface
QualifiedNameable
extends
Element
{
/**
* Returns the fully qualified name of an element.
*
* @return the fully qualified name of an element
*/
Name
getQualifiedName
();
}
langtools/src/share/classes/javax/lang/model/element/TypeElement.java
浏览文件 @
0cc50630
/*
* Copyright 2005-200
6
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2005-200
9
Sun Microsystems, Inc. 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
...
...
@@ -59,7 +59,7 @@ import javax.lang.model.util.*;
* @see DeclaredType
* @since 1.6
*/
public
interface
TypeElement
extends
Element
{
public
interface
TypeElement
extends
Element
,
Parameterizable
,
QualifiedNameable
{
/**
* Returns the <i>nesting kind</i> of this type element.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录