JavaTM 2 Platform
Standard Ed. 6

类 java.lang.Deprecated
的使用

使用 Deprecated 的软件包
java.awt 包含用于创建用户界面和绘制图形图像的所有类。 
java.awt.datatransfer 提供在应用程序之间和在应用程序内部传输数据的接口和类。 
java.awt.event 提供处理由 AWT 组件所激发的各类事件的接口和类。 
java.awt.image.renderable 提供用于生成与呈现无关的图像的类和接口。 
java.io 通过数据流、序列化和文件系统提供系统输入和输出。 
java.lang 提供利用 Java 编程语言进行程序设计的基础类。 
java.net 为实现网络应用程序提供类。 
java.rmi 提供 RMI 包。 
java.rmi.dgc 为 RMI 分布式垃圾回收提供了类和接口。 
java.rmi.registry 提供 RMI 注册表的一个类和两个接口。 
java.rmi.server 提供支持服务器端 RMI 的类和接口。 
java.security 为安全框架提供类和接口。 
java.sql 提供使用 JavaTM 编程语言访问并处理存储在数据源(通常是一个关系数据库)中的数据的 API。 
java.util 包含 collection 框架、遗留的 collection 类、事件模型、日期和时间设施、国际化和各种实用工具类(字符串标记生成器、随机数生成器和位数组)。 
java.util.logging 提供 JavaTM 2 平台核心日志工具的类和接口。 
javax.accessibility 定义了用户界面组件与提供对这些组件进行访问的辅助技术之间的协定。 
javax.jws.soap   
javax.management 提供 Java Management Extensions 的核心类。 
javax.management.loading 提供实现高级动态加载的类。 
javax.management.monitor 提供 monitor 类的定义。 
javax.management.openmbean 提供开放数据类型和 Open MBean 描述符类。 
javax.security.auth 此包提供用于进行验证和授权的框架。 
javax.swing 提供一组“轻量级”(全部是 Java 语言)组件,尽量让这些组件在所有平台上的工作方式都相同。 
javax.swing.plaf.basic 提供了根据基本外观构建的用户界面对象。 
javax.swing.plaf.metal 提供根据 Java 外观(曾经代称为 Metal)构建的用户界面对象,Java 外观是默认外观。 
javax.swing.table 提供用于处理 javax.swing.JTable 的类和接口。 
javax.swing.text 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。 
javax.swing.text.html 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。 
org.omg.CORBA 提供 OMG CORBA API 到 JavaTM 编程语言的映射,包括 ORB 类,如果已实现该类,则程序员可以使用此类作为全功能对象请求代理(Object Request Broker,ORB)。 
org.omg.CORBA.portable 提供可移植性层,即可以使一个供应商生成的代码运行在另一个供应商 ORB 上的 ORB API 集合。 
 

java.awtDeprecated 的使用
 

注释类型为 Deprecatedjava.awt 中的字段
static int Frame.CROSSHAIR_CURSOR
          已过时。 Cursor.CROSSHAIR_CURSOR 取代。
static int Frame.DEFAULT_CURSOR
          已过时。 Cursor.DEFAULT_CURSOR 取代。
static int Frame.E_RESIZE_CURSOR
          已过时。 Cursor.E_RESIZE_CURSOR 取代。
static int Frame.HAND_CURSOR
          已过时。 Cursor.HAND_CURSOR 取代。
static int Frame.MOVE_CURSOR
          已过时。 Cursor.MOVE_CURSOR 取代。
static int Frame.N_RESIZE_CURSOR
          已过时。 Cursor.N_RESIZE_CURSOR 取代。
static int Frame.NE_RESIZE_CURSOR
          已过时。 Cursor.NE_RESIZE_CURSOR 取代。
static int Frame.NW_RESIZE_CURSOR
          已过时。 Cursor.NW_RESIZE_CURSOR 取代。
static int Frame.S_RESIZE_CURSOR
          已过时。 Cursor.S_RESIZE_CURSOR 取代。
static int Frame.SE_RESIZE_CURSOR
          已过时。 Cursor.SE_RESIZE_CURSOR 取代。
static int Frame.SW_RESIZE_CURSOR
          已过时。 Cursor.SW_RESIZE_CURSOR 取代。
static int Frame.TEXT_CURSOR
          已过时。 Cursor.TEXT_CURSOR 取代。
static int Frame.W_RESIZE_CURSOR
          已过时。 Cursor.W_RESIZE_CURSOR 取代。
static int Frame.WAIT_CURSOR
          已过时。 Cursor.WAIT_CURSOR 取代。
 

注释类型为 Deprecatedjava.awt 中的方法
 boolean Component.action(Event evt, Object what)
          已过时。 从 JDK version 1.1 开始,应该将此组件作为组件(激发动作事件)上的 ActionListener 来注册。
 void List.addItem(String item)
          已过时。 add(String) 取代。
 void List.addItem(String item, int index)
          已过时。 add(String, int) 取代。
 void CardLayout.addLayoutComponent(String name, Component comp)
          已过时。 addLayoutComponent(Component, Object) 取代。
 void BorderLayout.addLayoutComponent(String name, Component comp)
          已过时。 addLayoutComponent(Component, Object) 取代。
 boolean List.allowsMultipleSelections()
          已过时。 从 JDK version 1.1 开始,由 isMultipleMode() 取代。
 void TextArea.appendText(String str)
          已过时。 从 JDK version 1.1 开始,由 append(String) 取代。
 void Window.applyResourceBundle(ResourceBundle rb)
          已过时。 从 J2SE 1.4 开始,由 Component.applyComponentOrientation 取代。
 void Window.applyResourceBundle(String rbName)
          已过时。 从 J2SE 1.4 开始,由 Component.applyComponentOrientation 取代。
 Rectangle Component.bounds()
          已过时。 从 JDK version 1.1 开始,由 getBounds() 取代。
 void List.clear()
          已过时。 从 JDK version 1.1 开始,由 removeAll() 取代。
 int Container.countComponents()
          已过时。 从 JDK version 1.1 开始,用 etComponentCount() 取代。
 int Choice.countItems()
          已过时。 从 JDK version 1.1 开始,由 getItemCount() 取代。
 int List.countItems()
          已过时。 从 JDK version 1.1 开始,由 getItemCount() 取代。
 int Menu.countItems()
          已过时。 从 JDK version 1.1 开始,已由 getItemCount() 取代。
 int MenuBar.countMenus()
          已过时。 从 JDK version 1.1 开始,由 getMenuCount() 取代。
 void List.delItem(int position)
          已过时。 remove(String)remove(int) 取代。
 void List.delItems(int start, int end)
          已过时。 从 JDK version 1.1 开始,后来不再公开使用。只希望作为包私有方法时保留此方法。
 void Container.deliverEvent(Event e)
          已过时。 从 JDK version 1.1 开始,用 dispatchEvent(AWTEvent e) 取代
 void Component.deliverEvent(Event e)
          已过时。 从 JDK version 1.1 开始,由 dispatchEvent(AWTEvent e) 取代。
 void MenuItem.disable()
          已过时。 从 JDK version 1.1 开始,由 setEnabled(boolean) 取代。
 void Component.disable()
          已过时。 从 JDK version 1.1 开始,由 setEnabled(boolean) 取代。
 void MenuItem.enable()
          已过时。 从 JDK version 1.1 开始,由 setEnabled(boolean) 取代。
 void Component.enable()
          已过时。 从 JDK version 1.1 开始,由 setEnabled(boolean) 取代。
 void MenuItem.enable(boolean b)
          已过时。 从 JDK version 1.1 开始,由 setEnabled(boolean) 取代。
 void Component.enable(boolean b)
          已过时。 从 JDK version 1.1 开始,由 setEnabled(boolean) 取代。
 Rectangle Polygon.getBoundingBox()
          已过时。 从 JDK version 1.1 开始,由 getBounds() 取代。
 Rectangle Graphics.getClipRect()
          已过时。 从 JDK version 1.1 开始,由 getClipBounds() 取代。
 Checkbox CheckboxGroup.getCurrent()
          已过时。 从 JDK version 1.1 开始,由 getSelectedCheckbox() 取代。
 int Frame.getCursorType()
          已过时。 从 JDK version 1.1 开始,由 Component.getCursor() 取代。
abstract  String[] Toolkit.getFontList()
          已过时。 请参阅 GraphicsEnvironment.getAvailableFontFamilyNames()
abstract  FontMetrics Toolkit.getFontMetrics(Font font)
          已过时。 从 JDK version 1.2 开始,由 Font 方法 getLineMetrics 取代。
protected abstract  java.awt.peer.FontPeer Toolkit.getFontPeer(String name, int style)
          已过时。 请参阅 java.awt.GraphicsEnvironment#getAllFonts
 int Scrollbar.getLineIncrement()
          已过时。 从 JDK version 1.1 开始,由 getUnitIncrement() 取代。
 int FontMetrics.getMaxDecent()
          已过时。 从 JDK version 1.1.1 开始,由 getMaxDescent() 取代。
static ComponentOrientation ComponentOrientation.getOrientation(ResourceBundle bdl)
          已过时。 在 J2SE 1.4 中,使用 ComponentOrientation.getOrientation(java.util.Locale)
 int Scrollbar.getPageIncrement()
          已过时。 从 JDK version 1.1 开始,由 getBlockIncrement() 取代。
 java.awt.peer.MenuComponentPeer MenuComponent.getPeer()
          已过时。 从 JDK version 1.1 开始,程序不应直接操作同位体。
 java.awt.peer.FontPeer Font.getPeer()
          已过时。 现在,字体呈现与平台无关。
 java.awt.peer.ComponentPeer Component.getPeer()
          已过时。 从 JDK version 1.1 开始,程序不应直接操作同位体;由 boolean isDisplayable() 取代。
 int Scrollbar.getVisible()
          已过时。 从 JDK version 1.1 开始,由 getVisibleAmount() 取代。
 boolean Component.gotFocus(Event evt, Object what)
          已过时。 从 JDK version 1.1 开始,由 processFocusEvent(FocusEvent) 取代。
 boolean Component.handleEvent(Event evt)
          已过时。 从 JDK version 1.1 开始,由 processEvent(AWTEvent) 取代。
 void Dialog.hide()
          已过时。 从 JDK 版本 1.5 开始,由 setVisible(boolean) 取代。
 void Window.hide()
          已过时。 从 JDK 1.5 版开始,由 Component.setVisible(boolean) 取代。
 void Component.hide()
          已过时。 从 JDK version 1.1 开始,由 setVisible(boolean) 取代。
 void TextArea.insertText(String str, int pos)
          已过时。 从 JDK version 1.1 开始,由 insert(String, int) 取代。
 Insets Container.insets()
          已过时。 从 JDK version 1.1 开始,用 getInsets() 取代。
 boolean Polygon.inside(int x, int y)
          已过时。 从 JDK version 1.1 开始, 此函数为 contains(int, int)
 boolean Rectangle.inside(int X, int Y)
          已过时。 从 JDK version 1.1 开始,由 contains(int, int) 取代。
 boolean Component.inside(int x, int y)
          已过时。 从 JDK version 1.1 开始,由 contains(int, int) 取代。
 boolean Component.isFocusTraversable()
          已过时。 从 1.4 开始,由 isFocusable() 取代。
 boolean List.isSelected(int index)
          已过时。 从 JDK version 1.1 开始,由 isIndexSelected(int) 取代。
 boolean Component.keyDown(Event evt, int key)
          已过时。 从 JDK version 1.1 开始,由 processKeyEvent(KeyEvent) 取代。
 boolean Component.keyUp(Event evt, int key)
          已过时。 从 JDK version 1.1 开始,由 processKeyEvent(KeyEvent) 取代。
 void ScrollPane.layout()
          已过时。 从 JDK version 1.1 开始,由 doLayout() 取代。
 void Container.layout()
          已过时。 从 JDK version 1.1,用 doLayout() 取代。
 void Component.layout()
          已过时。 从 JDK version 1.1 开始,由 doLayout() 取代。
 Component Container.locate(int x, int y)
          已过时。 从 JDK version 1.1 开始,用 getComponentAt(int, int) 取代。
 Component Component.locate(int x, int y)
          已过时。 从 JDK version 1.1 开始,由 getComponentAt(int, int) 取代。
 Point Component.location()
          已过时。 从 JDK version 1.1 开始,由 getLocation() 取代。
 boolean Component.lostFocus(Event evt, Object what)
          已过时。 从 JDK version 1.1 开始,由 processFocusEvent(FocusEvent) 取代。
 Dimension List.minimumSize()
          已过时。 从 JDK version 1.1 开始,由 getMinimumSize() 取代。
 Dimension TextArea.minimumSize()
          已过时。 从 JDK version 1.1 开始,由 getMinimumSize() 取代。
 Dimension TextField.minimumSize()
          已过时。 从 JDK version 1.1 开始,由 getMinimumSize() 取代。
 Dimension Container.minimumSize()
          已过时。 从 JDK version 1.1 开始,用 getMinimumSize() 取代。
 Dimension Component.minimumSize()
          已过时。 从 JDK version 1.1 开始,由 getMinimumSize() 取代。
 Dimension List.minimumSize(int rows)
          已过时。 从 JDK version 1.1 开始,由 getMinimumSize(int) 取代。
 Dimension TextField.minimumSize(int columns)
          已过时。 从 JDK version 1.1 开始,由 getMinimumSize(int) 取代。
 Dimension TextArea.minimumSize(int rows, int columns)
          已过时。 从 JDK version 1.1 开始,由 getMinimumSize(int, int) 取代。
 boolean Component.mouseDown(Event evt, int x, int y)
          已过时。 从 JDK version 1.1 开始,由 processMouseEvent(MouseEvent) 取代。
 boolean Component.mouseDrag(Event evt, int x, int y)
          已过时。 从 JDK version 1.1 开始,由 processMouseMotionEvent(MouseEvent) 取代。
 boolean Component.mouseEnter(Event evt, int x, int y)
          已过时。 从 JDK version 1.1 开始,由 processMouseEvent(MouseEvent) 取代。
 boolean Component.mouseExit(Event evt, int x, int y)
          已过时。 从 JDK version 1.1 开始,由 processMouseEvent(MouseEvent) 取代。
 boolean Component.mouseMove(Event evt, int x, int y)
          已过时。 从 JDK version 1.1 开始,由 processMouseMotionEvent(MouseEvent) 取代。
 boolean Component.mouseUp(Event evt, int x, int y)
          已过时。 从 JDK version 1.1 开始,由 processMouseEvent(MouseEvent) 取代。
 void Rectangle.move(int x, int y)
          已过时。 从 JDK version 1.1 开始,由 setLocation(int, int) 取代。
 void Component.move(int x, int y)
          已过时。 从 JDK version 1.1 开始,由 setLocation(int, int) 取代。
 void Component.nextFocus()
          已过时。 从 JDK version 1.1 开始,由 transferFocus() 取代。
 boolean MenuComponent.postEvent(Event evt)
          已过时。 从 JDK version 1.1 开始,已由 dispatchEvent 取代。
 boolean Window.postEvent(Event e)
          已过时。 从 JDK version 1.1 开始,由 dispatchEvent(AWTEvent) 取代。
 boolean Component.postEvent(Event e)
          已过时。 从 JDK version 1.1 开始,由 dispatchEvent(AWTEvent) 取代。
 boolean MenuContainer.postEvent(Event evt)
          已过时。 从 JDK version 1.1 开始,由 dispatchEvent(AWTEvent) 取代。
 Dimension List.preferredSize()
          已过时。 从 JDK version 1.1 开始,由 getPreferredSize() 取代。
 Dimension TextArea.preferredSize()
          已过时。 从 JDK version 1.1 开始,由 getPreferredSize() 取代。
 Dimension TextField.preferredSize()
          已过时。 从 JDK version 1.1 开始,由 getPreferredSize() 取代。
 Dimension Container.preferredSize()
          已过时。 从 JDK version 1.1 开始,用 getPreferredSize() 取代。
 Dimension Component.preferredSize()
          已过时。 从 JDK version 1.1 开始,由 getPreferredSize() 取代。
 Dimension List.preferredSize(int rows)
          已过时。 从 JDK version 1.1 开始,由 getPreferredSize(int) 取代。
 Dimension TextField.preferredSize(int columns)
          已过时。 从 JDK version 1.1 开始,由 getPreferredSize(int) 取代。
 Dimension TextArea.preferredSize(int rows, int columns)
          已过时。 从 JDK version 1.1 开始,由 getPreferredSize(int, int) 取代。
 void TextArea.replaceText(String str, int start, int end)
          已过时。 从 JDK version 1.1 开始,由 replaceRange(String, int, int) 取代。
 void Rectangle.reshape(int x, int y, int width, int height)
          已过时。 从 JDK version 1.1 开始,由 setBounds(int, int, int, int) 取代。
 void Window.reshape(int x, int y, int width, int height)
          已过时。 从 JDK 1.1 版开始,由 setBounds(int, int, int, int) 取代。
 void Component.reshape(int x, int y, int width, int height)
          已过时。 从 JDK version 1.1 开始,由 setBounds(int, int, int, int) 取代。
 void Component.resize(Dimension d)
          已过时。 从 JDK version 1.1 开始,由 setSize(Dimension) 取代。
 void Rectangle.resize(int width, int height)
          已过时。 从 JDK version 1.1 开始,由 setSize(int, int) 取代。
 void Component.resize(int width, int height)
          已过时。 从 JDK version 1.1 开始,由 setSize(int, int) 取代。
 void CheckboxGroup.setCurrent(Checkbox box)
          已过时。 从 JDK version 1.1 开始,由 setSelectedCheckbox(Checkbox) 取代。
 void Frame.setCursor(int cursorType)
          已过时。 从 JDK version 1.1 开始,由 Component.setCursor(Cursor) 取代。
 void TextField.setEchoCharacter(char c)
          已过时。 从 JDK version 1.1 开始,由 setEchoChar(char) 取代。
 void Scrollbar.setLineIncrement(int v)
          已过时。 从 JDK version 1.1 开始,由 setUnitIncrement(int) 取代。
 void List.setMultipleSelections(boolean b)
          已过时。 从 JDK version 1.1 开始,由 setMultipleMode(boolean) 取代。
 void Scrollbar.setPageIncrement(int v)
          已过时。 从 JDK version 1.1 开始,由 setBlockIncrement() 取代。
 void Dialog.show()
          已过时。 从 JDK 版本 1.5 开始,由 setVisible(boolean) 取代。
 void Window.show()
          已过时。 从 JDK 1.5 版开始,由 Component.setVisible(boolean) 取代。
 void Component.show()
          已过时。 从 JDK version 1.1 开始,由 setVisible(boolean) 取代。
 void Component.show(boolean b)
          已过时。 从 JDK version 1.1 开始,由 setVisible(boolean) 取代。
 Dimension Component.size()
          已过时。 从 JDK version 1.1 开始,由 getSize() 取代。
 

java.awt.datatransferDeprecated 的使用
 

注释类型为 Deprecatedjava.awt.datatransfer 中的字段
static DataFlavor DataFlavor.plainTextFlavor
          已过时。 从 1.3 开始。使用 DataFlavor.getReaderForText(Transferable) 代替 Transferable.getTransferData(DataFlavor.plainTextFlavor)
 

注释类型为 Deprecatedjava.awt.datatransfer 中的方法
 boolean DataFlavor.equals(String s)
          已过时。 hashCode() 协定不一致,使用 isMimeTypeEqual(String) 代替。
protected  String DataFlavor.normalizeMimeType(String mimeType)
          已过时。  
protected  String DataFlavor.normalizeMimeTypeParameter(String parameterName, String parameterValue)
          已过时。  
 

java.awt.eventDeprecated 的使用
 

注释类型为 Deprecatedjava.awt.event 中的方法
 void KeyEvent.setModifiers(int modifiers)
          已过时。 从 JDK1.1.4 开始
 

注释类型为 Deprecatedjava.awt.event 中的构造方法
KeyEvent(Component source, int id, long when, int modifiers, int keyCode)
          已过时。 从 JDK1.1 开始
 

java.awt.image.renderableDeprecated 的使用
 

注释类型为 Deprecatedjava.awt.image.renderable 中的方法
 void RenderContext.concetenateTransform(AffineTransform modTransform)
          已过时。 concatenateTransform(AffineTransform) 所替代。
 void RenderContext.preConcetenateTransform(AffineTransform modTransform)
          已过时。 preConcatenateTransform(AffineTransform) 所取代。
 

java.ioDeprecated 的使用
 

注释类型为 Deprecatedjava.io 中的类
 class LineNumberInputStream
          已过时。 此类错误假定字节能充分表示字符。从 JDK 1.1 开始,对字符流操作的首选方法是通过新字符流类(其中包括计算行号的类)进行操作。
 class StringBufferInputStream
          已过时。 此类未能正确地将字符转换为字节。从 JDK 1.1 开始,从字符串创建流的首选方法是通过 StringReader 类进行创建。
 

注释类型为 Deprecatedjava.io 中的方法
 String ObjectInputStream.readLine()
          已过时。 此方法不能正确地将字节转换为字符。请参见 DataInputStream 以获取详细信息和替代方法。
 String DataInputStream.readLine()
          已过时。 该方法无法将字节正确转换为字符。从 JDK 1.1 开始,读取文本行的首选方法是使用 BufferedReader.readLine() 方法。使用 DataInputStream 类读取文本行的程序可以改为使用 BufferedReader 类,只要将以下形式的代码:
     DataInputStream d = new DataInputStream(in);
 
替换为:
     BufferedReader d
          = new BufferedReader(new InputStreamReader(in));
 
 String ByteArrayOutputStream.toString(int hibyte)
          已过时。 此方法无法将字节正确转换为字符。从 JDK 1.1 开始,完成该转换的首选方法是通过 toString(String enc) 方法(使用一个编码名称参数),或 toString() 方法(使用平台的默认字符编码)。
 URL File.toURL()
          已过时。 此方法不会自动转义 URL 中的非法字符。建议新的代码使用以下方式将抽象路径名转换为 URL:首先通过 toURI 方法将其转换为 URI,然后通过 URI.toURL 方法将 URI 装换为 URL。
abstract  void ObjectOutputStream.PutField.write(ObjectOutput out)
          已过时。 此方法不能以正确格式写入 PutField 对象中包含的值,并且可能导致序列化流的损坏。写入 PutField 数据的正确方法是调用 ObjectOutputStream.writeFields() 方法。
 

注释类型为 Deprecatedjava.io 中的构造方法
StreamTokenizer(InputStream is)
          已过时。 从 JDK 版本 1.1 开始,标记输入流的首选方法是将其转换为一个字符流,例如:
   Reader r = new BufferedReader(new InputStreamReader(is));
   StreamTokenizer st = new StreamTokenizer(r);
 
 

java.langDeprecated 的使用
 

注释类型为 Deprecatedjava.lang 中的字段
protected  boolean SecurityManager.inCheck
          已过时。 建议不使用该类型的安全检查。建议使用 checkPermission 调用。
static Character.UnicodeBlock Character.UnicodeBlock.SURROGATES_AREA
          已过时。 从 J2SE 5 开始,使用 Character.UnicodeBlock.HIGH_SURROGATESCharacter.UnicodeBlock.HIGH_PRIVATE_USE_SURROGATESCharacter.UnicodeBlock.LOW_SURROGATES。这些新常量符合 Unicode 标准的块定义。Character.UnicodeBlock.of(char)Character.UnicodeBlock.of(int) 方法返回新常量,而不是 SURROGATES_AREA。
 

注释类型为 Deprecatedjava.lang 中的方法
 boolean ThreadGroup.allowThreadSuspension(boolean b)
          已过时。 此调用的定义取决于 ThreadGroup.suspend(),它被废弃了。更进一步地说,此调用的行为从不被指定。
 void SecurityManager.checkMulticast(InetAddress maddr, byte ttl)
          已过时。 由 #checkPermission(java.security.Permission) 取代
protected  int SecurityManager.classDepth(String name)
          已过时。 建议不使用该类安全检查。建议使用 checkPermission 调用。
protected  int SecurityManager.classLoaderDepth()
          已过时。 建议不使用该类安全检查。建议使用 checkPermission 调用。
 int Thread.countStackFrames()
          已过时。 该调用的定义依赖于 Thread.suspend(),但它遭到了反对。此外,该调用的结果从来都不是意义明确的。
protected  ClassLoader SecurityManager.currentClassLoader()
          已过时。 建议不使用该类安全检查。建议使用 checkPermission 调用。
protected  Class<?> SecurityManager.currentLoadedClass()
          已过时。 建议不使用该类安全检查。建议使用 checkPermission 调用。
protected  Class<?> ClassLoader.defineClass(byte[] b, int off, int len)
          已过时。 defineClass(String, byte[], int, int) 取代
 void Thread.destroy()
          已过时。 该方法最初用于破坏该线程,但不作任何清除。它所保持的任何监视器都会保持锁定状态。不过,该方法决不会被实现。即使要实现,它也极有可能以 Thread.suspend() 方式被死锁。如果目标线程被破坏时保持一个保护关键系统资源的锁,则任何线程在任何时候都无法再次访问该资源。如果另一个线程曾试图锁定该资源,则会出现死锁。这类死锁通常会证明它们自己是“冻结”的进程。有关更多信息,请参阅为何不赞成使用 Thread.stop、Thread.suspend 和 Thread.resume?
 void String.getBytes(int srcBegin, int srcEnd, byte[] dst, int dstBegin)
          已过时。 该方法无法将字符正确转换为字节。从 JDK 1.1 起,完成该转换的首选方法是通过 String.getBytes() 方法,该方法使用平台的默认字符集。
 boolean SecurityManager.getInCheck()
          已过时。 建议不使用该类安全检查。建议使用 checkPermission 调用。
 InputStream Runtime.getLocalizedInputStream(InputStream in)
          已过时。 从 JDK 1.1 开始,将本地编码字节流转换为 Unicode 字符流的首选方法是使用 InputStreamReaderBufferedReader 类。
 OutputStream Runtime.getLocalizedOutputStream(OutputStream out)
          已过时。 从 JDK 1.1 开始,将 Unicode 字符流转换为本地编码字节流的首选方法是使用 OutputStreamWriterBufferedWriterPrintWriter 类。
protected  boolean SecurityManager.inClass(String name)
          已过时。 建议不使用该类安全检查。建议使用 checkPermission 调用。
protected  boolean SecurityManager.inClassLoader()
          已过时。 建议不使用该类安全检查。建议使用 checkPermission 调用。
static boolean Character.isJavaLetter(char ch)
          已过时。 由 isJavaIdentifierStart(char) 取代。
static boolean Character.isJavaLetterOrDigit(char ch)
          已过时。 由 isJavaIdentifierPart(char) 取代。
static boolean Character.isSpace(char ch)
          已过时。 由 isWhitespace(char) 取代。
 void ThreadGroup.resume()
          已过时。 此方法只用于联合 Thread.suspendThreadGroup.suspend 时,因为它们所固有的容易导致死锁的特性,所以两者都已废弃。有关详细信息,请参阅 Thread.suspend()
 void Thread.resume()
          已过时。 该方法只与 Thread.suspend() 一起使用,但 Thread.suspend() 已经遭到反对,因为它具有死锁倾向。有关更多信息,请参阅为何不赞成使用 Thread.stop、Thread.suspend 和 Thread.resume?
static void Runtime.runFinalizersOnExit(boolean value)
          已过时。 此方法本身具有不安全性。它可能对正在使用的对象调用终结方法,而其他线程正在操作这些对象,从而导致不正确的行为或死锁。
static void System.runFinalizersOnExit(boolean value)
          已过时。 该方法具有固有的不安全性。它可能对正在使用的对象调用终结方法,而其他线程同时正在操作这些对象,从而导致不正确的行为或死锁。
 void ThreadGroup.stop()
          已过时。 此方法具有固有的不安全性。有关详细信息,请参阅 Thread.stop()
 void Thread.stop()
          已过时。 该方法具有固有的不安全性。用 Thread.stop 来终止线程将释放它已经锁定的所有监视器(作为沿堆栈向上传播的未检查 ThreadDeath 异常的一个自然后果)。如果以前受这些监视器保护的任何对象都处于一种不一致的状态,则损坏的对象将对其他线程可见,这有可能导致任意的行为。stop 的许多使用都应由只修改某些变量以指示目标线程应该停止运行的代码来取代。目标线程应定期检查该变量,并且如果该变量指示它要停止运行,则从其运行方法依次返回。如果目标线程等待很长时间(例如基于一个条件变量),则应使用 interrupt 方法来中断该等待。有关更多信息,请参阅为何不赞成使用 Thread.stop、Thread.suspend 和 Thread.resume?
 void Thread.stop(Throwable obj)
          已过时。 该方法具有固有的不安全性。有关详细信息,请参阅 Thread.stop()。 该方法的附加危险是它可用于生成目标线程未准备处理的异常(包括若没有该方法该线程不太可能抛出的已检查的异常)。 有关更多信息,请参阅为何不赞成使用 Thread.stop、Thread.suspend 和 Thread.resume?
 void ThreadGroup.suspend()
          已过时。 此方法容易导致死锁。有关详细信息,请参阅 Thread.suspend()
 void Thread.suspend()
          已过时。 该方法已经遭到反对,因为它具有固有的死锁倾向。如果目标线程挂起时在保护关键系统资源的监视器上保持有锁,则在目标线程重新开始以前任何线程都不能访问该资源。如果重新开始目标线程的线程想在调用 resume 之前锁定该监视器,则会发生死锁。这类死锁通常会证明自己是“冻结”的进程。有关更多信息,请参阅为何不赞成使用 Thread.stop、Thread.suspend 和 Thread.resume?
 

注释类型为 Deprecatedjava.lang 中的构造方法
String(byte[] ascii, int hibyte)
          已过时。 该方法无法将字节正确地转换为字符。从 JDK 1.1 开始,完成该转换的首选方法是使用带有 Charset、字符集名称,或使用平台默认字符集的 String 构造方法。
String(byte[] ascii, int hibyte, int offset, int count)
          已过时。 该方法无法将字节正确地转换为字符。从 JDK 1.1 开始,完成该转换的首选方法是使用带有 Charset、字符集名称,或使用平台默认字符集的 String 构造方法。
 

java.netDeprecated 的使用
 

注释类型为 Deprecatedjava.net 中的字段
static int HttpURLConnection.HTTP_SERVER_ERROR
          已过时。 放错了位置,它不应该存在。
 

注释类型为 Deprecatedjava.net 中的方法
static String URLDecoder.decode(String s)
          已过时。 结果字符串可能因平台默认编码不同而不同。因此,改用 decode(String,String) 方法指定编码。
static String URLEncoder.encode(String s)
          已过时。 结果字符串可能因平台默认编码不同而不同。因此,改用 encode(String,String) 方法指定编码。
static String URLConnection.getDefaultRequestProperty(String key)
          已过时。 应在获得 URLConnection 的适当实例后使用特定 getRequestProperty 方法的实例。
protected abstract  byte DatagramSocketImpl.getTTL()
          已过时。 使用 getTimeToLive 代替。
 byte MulticastSocket.getTTL()
          已过时。 使用 getTimeToLive 方法来代替,该方法返回 int(而不是 byte)。
 void MulticastSocket.send(DatagramPacket p, byte ttl)
          已过时。 使用以下代码或其等效代码:...... int ttl = mcastSocket.getTimeToLive(); mcastSocket.setTimeToLive(newttl); mcastSocket.send(p); mcastSocket.setTimeToLive(ttl); ......
static void URLConnection.setDefaultRequestProperty(String key, String value)
          已过时。 应在获得 URLConnection 的适当实例后使用特定 setRequestProperty 方法的实例。调用此方法没有任何作用。
protected abstract  void DatagramSocketImpl.setTTL(byte ttl)
          已过时。 使用 setTimeToLive 代替。
 void MulticastSocket.setTTL(byte ttl)
          已过时。 使用 setTimeToLive 方法来代替,该方法使用 int(而不用 byte)作为 ttl 的类型。
protected  void URLStreamHandler.setURL(URL u, String protocol, String host, int port, String file, String ref)
          已过时。 使用 setURL(URL, String, String, int, String, String, String, String);
 

注释类型为 Deprecatedjava.net 中的构造方法
Socket(InetAddress host, int port, boolean stream)
          已过时。 Use DatagramSocket instead for UDP transport.
Socket(String host, int port, boolean stream)
          已过时。 使用 DatagramSocket 取代 UDP 传输。
 

java.rmiDeprecated 的使用
 

注释类型为 Deprecatedjava.rmi 中的类
 class RMISecurityException
          已过时。 SecurityException 取代。应用程序代码从来不应直接引用此类,且 RMISecurityManager 不再抛出 java.lang.SecurityException 的这个子类。
 class ServerRuntimeException
          已过时。 无替换版本
 

注释类型为 Deprecatedjava.rmi 中的构造方法
RMISecurityException(String name)
          已过时。 无替换版本
RMISecurityException(String name, String arg)
          已过时。 无替换版本
ServerRuntimeException(String s, Exception ex)
          已过时。 无替换版本
 

java.rmi.dgcDeprecated 的使用
 

注释类型为 Deprecatedjava.rmi.dgc 中的方法
static boolean VMID.isUnique()
          已过时。  
 

java.rmi.registryDeprecated 的使用
 

注释类型为 Deprecatedjava.rmi.registry 中的类
 interface RegistryHandler
          已过时。 无替代版本
 

注释类型为 Deprecatedjava.rmi.registry 中的方法
 Registry RegistryHandler.registryImpl(int port)
          已过时。 无替代版本。从 Java 2 平台 1.2 版本开始,RMI 不再使用 RegistryHandler 获取注册表的实现。
 Registry RegistryHandler.registryStub(String host, int port)
          已过时。 无替代版本。从 Java 2 平台 1.2 版本开始,RMI 不再使用 RegistryHandler 获取注册表的 stub。
 

java.rmi.serverDeprecated 的使用
 

注释类型为 Deprecatedjava.rmi.server 中的类
 interface LoaderHandler
          已过时。 无替代版本
 class LogStream
          已过时。 无替代版本
 class Operation
          已过时。 无替代版本
 interface RemoteCall
          已过时。 无替代版本。
 interface Skeleton
          已过时。 无替代版本。在 Java 2 平台 1.2 版及更高版本中,远程方法调用不再需要 Skeleton。
 class SkeletonMismatchException
          已过时。 无替代版本。在 Java 2 平台 1.2 版及更高版本中,远程方法调用不再需要 Skeleton。
 class SkeletonNotFoundException
          已过时。 无替代版本在 Java 2 平台 1.2 版及更高版本中,远程方法调用不再需要 Skeleton。
 

注释类型为 Deprecatedjava.rmi.server 中的方法
 void Skeleton.dispatch(Remote obj, RemoteCall theCall, int opnum, long hash)
          已过时。 无替代版本
 void RemoteCall.done()
          已过时。 无替代版本
 void RemoteRef.done(RemoteCall call)
          已过时。 1.2 样式 stub 不再使用此方法。stub 使用远程引用上的单个方法 invoke(Remote, Method, Object[], int) 来执行参数编组、远程方法执行和返回值解组,而不是使用对远程引用(newCallinvokedone)的方法调用序列。
 void RemoteCall.executeCall()
          已过时。 无替代版本
static PrintStream LogStream.getDefaultStream()
          已过时。 无替代版本
 ObjectInput RemoteCall.getInputStream()
          已过时。 无替代版本
 String Operation.getOperation()
          已过时。 无替代版本
 Operation[] Skeleton.getOperations()
          已过时。 无替代版本
 OutputStream LogStream.getOutputStream()
          已过时。 无替代版本
 ObjectOutput RemoteCall.getOutputStream()
          已过时。 无替代版本
 ObjectOutput RemoteCall.getResultStream(boolean success)
          已过时。 无替代版本
 Object LoaderHandler.getSecurityContext(ClassLoader loader)
          已过时。 无替代版本
static Object RMIClassLoader.getSecurityContext(ClassLoader loader)
          已过时。 无替换版本。从 Java 2 平台 v1.2 开始,RMI 不再使用此方法来获取类加载器的安全上下文。
 void RemoteRef.invoke(RemoteCall call)
          已过时。 1.2 样式 stub 不再使用此方法。stub 使用远程引用上的单个方法 invoke(Remote, Method, Object[], int) 来执行参数编组、远程方法执行和返回值解组,而不是使用对远程引用(newCallinvokedone)的方法调用序列。
 Class<?> LoaderHandler.loadClass(String name)
          已过时。 无替代版本
static Class<?> RMIClassLoader.loadClass(String name)
          已过时。 loadClass(String,String) 方法取代
 Class<?> LoaderHandler.loadClass(URL codebase, String name)
          已过时。 无替代版本
static LogStream LogStream.log(String name)
          已过时。 无替代版本
 RemoteCall RemoteRef.newCall(RemoteObject obj, Operation[] op, int opnum, long hash)
          已过时。 1.2 样式 stub 不再使用此方法。stub 使用远程引用上的单个方法 invoke(Remote, Method, Object[], int) 来执行参数编组、远程方法执行和返回值的解组,而不是使用该 stub 的远程引用(newCallinvokedone)上的方法调用序列。
static int LogStream.parseLevel(String s)
          已过时。 无替代版本
 void RemoteCall.releaseInputStream()
          已过时。 无替代版本
 void RemoteCall.releaseOutputStream()
          已过时。 无替代版本
static void LogStream.setDefaultStream(PrintStream newDefault)
          已过时。 无替代版本
 void LogStream.setOutputStream(OutputStream out)
          已过时。 无替代版本
protected static void RemoteStub.setRef(RemoteStub stub, RemoteRef ref)
          已过时。 无替换版本。因为可以用 RemoteStub(RemoteRef) 构造方法创建 RemoteStub,所以不需要 setRef 方法。
 String LogStream.toString()
          已过时。 无替代版本
 String Operation.toString()
          已过时。 无替代版本
 void LogStream.write(byte[] b, int off, int len)
          已过时。 无替代版本
 void LogStream.write(int b)
          已过时。 无替代版本
 

注释类型为 Deprecatedjava.rmi.server 中的构造方法
Operation(String op)
          已过时。 无替代版本
SkeletonMismatchException(String s)
          已过时。 无替代版本
 

java.securityDeprecated 的使用
 

注释类型为 Deprecatedjava.security 中的类
 interface Certificate
          已过时。 在 Java 平台中创建了新的证书处理包。此 Certificate 接口已完全废弃,其仍存在是为了能平稳地过渡到新包。
 class Identity
          已过时。 不再使用此类。其功能已经由 java.security.KeyStorejava.security.cert 包和 java.security.Principal 取代。
 class IdentityScope
          已过时。 此类不再被使用。其功能已经由 java.security.KeyStorejava.security.cert 包和 java.security.Principal 取代。
 class Signer
          已过时。 将不再使用此类。其功能已由 java.security.KeyStorejava.security.cert 包和 java.security.Principal 所取代。
 

注释类型为 Deprecatedjava.security 中的方法
protected abstract  Object SignatureSpi.engineGetParameter(String param)
          已过时。  
protected abstract  void SignatureSpi.engineSetParameter(String param, Object value)
          已过时。 engineSetParameter 取代。
static String Security.getAlgorithmProperty(String algName, String propName)
          已过时。 此方法用来返回 "SUN" 密码服务提供者的主文件中的专有属性的值,以便确定如何解析特定于算法的参数。使用新的基于提供者的、与算法无关的 AlgorithmParametersKeyFactory 引擎类(在 J2SE 1.2 版中引入)代替。
 Object Signature.getParameter(String param)
          已过时。  
 void Signature.setParameter(String param, Object value)
          已过时。 使用 setParameter 取代。
 

java.sqlDeprecated 的使用
 

注释类型为 Deprecatedjava.sql 中的方法
 int Time.getDate()
          已过时。  
 int Time.getDay()
          已过时。  
 int Time.getMonth()
          已过时。  
 int Time.getYear()
          已过时。  
 void Time.setDate(int i)
          已过时。  
 void Time.setMonth(int i)
          已过时。  
 void Time.setYear(int i)
          已过时。  
 

注释类型为 Deprecatedjava.sql 中的构造方法
Time(int hour, int minute, int second)
          已过时。 使用采用毫秒值的构造方法取代此构造方法
Timestamp(int year, int month, int date, int hour, int minute, int second, int nano)
          已过时。 使用构造方法 Timestamp(long millis) 来代替
 

java.utilDeprecated 的使用
 

注释类型为 Deprecatedjava.util 中的方法
 int Date.getDate()
          已过时。 从 JDK 1.1 开始,由 Calendar.get(Calendar.DAY_OF_MONTH) 取代。
 int Date.getDay()
          已过时。 从 JDK 1.1 开始,由 Calendar.get(Calendar.DAY_OF_WEEK) 取代。
 int Date.getHours()
          已过时。 从 JDK 1.1 开始,由 Calendar.get(Calendar.HOUR_OF_DAY) 取代。
 int Date.getMinutes()
          已过时。 从 JDK 1.1 开始,由 Calendar.get(Calendar.MINUTE) 取代。
 int Date.getMonth()
          已过时。 从 JDK 1.1 开始,由 Calendar.get(Calendar.MONTH) 取代。
 int Date.getSeconds()
          已过时。 从 JDK 1.1 开始,由 Calendar.get(Calendar.SECOND) 取代。
 int Date.getTimezoneOffset()
          已过时。 从 JDK 1.1 开始,由 -(Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET)) / (60 * 1000) 取代。
 int Date.getYear()
          已过时。 从 JDK 1.1 开始,由 Calendar.get(Calendar.YEAR) - 1900 取代。
static long Date.parse(String s)
          已过时。 从 JDK 1.1 开始,由 DateFormat.parse(String s) 取代。
 void Properties.save(OutputStream out, String comments)
          已过时。 如果在保存属性列表时发生 I/O 错误,则此方法不抛出 IOException。保存属性列表的首选方法是通过 store(OutputStream out, String comments) 方法或 storeToXML(OutputStream os, String comment) 方法来进行。
 void Date.setDate(int date)
          已过时。 从 JDK 1.1 开始,由 Calendar.set(Calendar.DAY_OF_MONTH, int date) 取代。
 void Date.setHours(int hours)
          已过时。 从 JDK 1.1 开始,由 Calendar.set(Calendar.HOUR_OF_DAY, int hours) 取代。
 void Date.setMinutes(int minutes)
          已过时。 从 JDK 1.1 开始,由 Calendar.set(Calendar.MINUTE, int minutes) 取代。
 void Date.setMonth(int month)
          已过时。 从 JDK 1.1 开始,由 Calendar.set(Calendar.MONTH, int month) 取代。
 void Date.setSeconds(int seconds)
          已过时。 从 JDK 1.1 开始,由 Calendar.set(Calendar.SECOND, int seconds) 取代。
 void Date.setYear(int year)
          已过时。 从 JDK 1.1 开始,由 Calendar.set(Calendar.YEAR, year + 1900) 取代。
 String Date.toGMTString()
          已过时。 从 JDK 1.1 开始,由 DateFormat.format(Date date) 取代,使用 GMT TimeZone
 String Date.toLocaleString()
          已过时。 从 JDK 1.1 开始,由 DateFormat.format(Date date) 取代。
static long Date.UTC(int year, int month, int date, int hrs, int min, int sec)
          已过时。 从 JDK 1.1 开始,由 Calendar.set(year + 1900, month, date, hrs, min, sec)GregorianCalendar(year + 1900, month, date, hrs, min, sec) 取代,使用 UTC TimeZone,后跟 Calendar.getTime().getTime()
 

注释类型为 Deprecatedjava.util 中的构造方法
Date(int year, int month, int date)
          已过时。 从 JDK 1.1 开始,由 Calendar.set(year + 1900, month, date)GregorianCalendar(year + 1900, month, date) 取代。
Date(int year, int month, int date, int hrs, int min)
          已过时。 从 JDK 1.1 开始,由 Calendar.set(year + 1900, month, date, hrs, min)GregorianCalendar(year + 1900, month, date, hrs, min) 取代。
Date(int year, int month, int date, int hrs, int min, int sec)
          已过时。 从 JDK 1.1 开始,由 Calendar.set(year + 1900, month, date, hrs, min, sec)GregorianCalendar(year + 1900, month, date, hrs, min, sec) 取代。
Date(String s)
          已过时。 从 JDK 1.1 开始,由 DateFormat.parse(String s) 取代。
 

java.util.loggingDeprecated 的使用
 

注释类型为 Deprecatedjava.util.logging 中的字段
static Logger Logger.global
          已过时。 此字段的初始化会容易出现死锁。必须由 Logger 类初始化来初始化字段,这可能会导致 LogManager 类初始化的死锁。在这种情况下,两个类初始化都要等待对方完成。从 JDK version 1.6 开始,获取全局 logger 对象的首选方法是通过调用 Logger.getLogger(Logger.GLOBAL_LOGGER_NAME)
 

javax.accessibilityDeprecated 的使用
 

注释类型为 Deprecatedjavax.accessibility 中的类
 class AccessibleResourceBundle
          已过时。 从 Java Platform 的 1.3 版开始,此类已废弃。
 

javax.jws.soapDeprecated 的使用
 

注释类型为 Deprecatedjavax.jws.soap 中的类
 interface InitParam
          已过时。 从 JSR-181 2.0 开始,无替代版本。
 interface SOAPMessageHandler
          已过时。 从 JSR-181 2.0 开始,无替代版本。
 interface SOAPMessageHandlers
          已过时。 从 JSR-181 2.0 开始,无替代版本。
 

javax.managementDeprecated 的使用
 

注释类型为 Deprecatedjavax.management 中的类
 class DefaultLoaderRepository
          已过时。 使用 MBeanServer.getClassLoaderRepository() 取代。
 

注释类型为 Deprecatedjavax.management 中的方法
 ObjectInputStream MBeanServer.deserialize(ObjectName name, byte[] data)
          已过时。 使用 getClassLoaderFor 为反序列化获得合适的类加载器。
 ObjectInputStream MBeanServer.deserialize(String className, byte[] data)
          已过时。 使用 MBeanServer.getClassLoaderRepository() 来获得类加载器存储库并使用它进行反序列化。
 ObjectInputStream MBeanServer.deserialize(String className, ObjectName loaderName, byte[] data)
          已过时。 使用 getClassLoader 为反序列化获得类加载器。
 void ValueExp.setMBeanServer(MBeanServer s)
          已过时。 不再需要此方法,因为 ValueExp 可以通过使用 QueryEval.getMBeanServer() 来访问它将在其中进行计算的 MBean 服务器。
 

注释类型为 Deprecatedjavax.management 中的构造方法
AttributeValueExp()
          已过时。 在查询中不能使用此构造方法所创建的实例。
 

javax.management.loadingDeprecated 的使用
 

注释类型为 Deprecatedjavax.management.loading 中的类
 class DefaultLoaderRepository
          已过时。 使用 MBeanServer.getClassLoaderRepository()} 替代。
 

javax.management.monitorDeprecated 的使用
 

注释类型为 Deprecatedjavax.management.monitor 中的字段
protected  int Monitor.alreadyNotified
          已过时。 等效于 Monitor.alreadyNotifieds[0]。
protected  String Monitor.dbgTag
          已过时。 无替代版本。
 

注释类型为 Deprecatedjavax.management.monitor 中的方法
 Number CounterMonitor.getDerivedGauge()
          已过时。 从 JMX 1.2 开始,由 CounterMonitor.getDerivedGauge(ObjectName) 取代
 Number CounterMonitorMBean.getDerivedGauge()
          已过时。 从 JMX 1.2 开始,由 CounterMonitorMBean.getDerivedGauge(ObjectName) 取代
 Number GaugeMonitor.getDerivedGauge()
          已过时。 从 JMX 1.2 开始,由 GaugeMonitor.getDerivedGauge(ObjectName) 取代
 Number GaugeMonitorMBean.getDerivedGauge()
          已过时。 从 JMX 1.2 开始,由 GaugeMonitorMBean.getDerivedGauge(ObjectName) 取代
 String StringMonitor.getDerivedGauge()
          已过时。 从 JMX 1.2 开始,由 StringMonitor.getDerivedGauge(ObjectName) 取代
 String StringMonitorMBean.getDerivedGauge()
          已过时。 从 JMX 1.2 开始,由 StringMonitorMBean.getDerivedGauge(ObjectName) 取代
 long CounterMonitor.getDerivedGaugeTimeStamp()
          已过时。 从 JMX 1.2 开始,由 CounterMonitor.getDerivedGaugeTimeStamp(ObjectName) 取代
 long CounterMonitorMBean.getDerivedGaugeTimeStamp()
          已过时。 从 JMX 1.2 开始,由 CounterMonitorMBean.getDerivedGaugeTimeStamp(ObjectName) 取代
 long GaugeMonitor.getDerivedGaugeTimeStamp()
          已过时。 从 JMX 1.2 开始,由 GaugeMonitor.getDerivedGaugeTimeStamp(ObjectName) 取代
 long GaugeMonitorMBean.getDerivedGaugeTimeStamp()
          已过时。 从 JMX 1.2 开始,由 GaugeMonitorMBean.getDerivedGaugeTimeStamp(ObjectName) 取代
 long StringMonitor.getDerivedGaugeTimeStamp()
          已过时。 从 JMX 1.2 开始,由 StringMonitor.getDerivedGaugeTimeStamp(ObjectName) 取代
 long StringMonitorMBean.getDerivedGaugeTimeStamp()
          已过时。 从 JMX 1.2 开始,由 StringMonitorMBean.getDerivedGaugeTimeStamp(ObjectName) 取代
 ObjectName Monitor.getObservedObject()
          已过时。 从 JMX 1.2 开始,由 Monitor.getObservedObjects() 取代
 ObjectName MonitorMBean.getObservedObject()
          已过时。 从 JMX 1.2 开始,由 MonitorMBean.getObservedObjects() 取代
 Number CounterMonitor.getThreshold()
          已过时。 从 JMX 1.2 开始,由 CounterMonitor.getThreshold(ObjectName) 取代
 Number CounterMonitorMBean.getThreshold()
          已过时。 从 JMX 1.2 开始,由 CounterMonitorMBean.getThreshold(ObjectName) 取代
 void Monitor.setObservedObject(ObjectName object)
          已过时。 从 JMX 1.2 开始,由 Monitor.addObservedObject(javax.management.ObjectName) 取代
 void MonitorMBean.setObservedObject(ObjectName object)
          已过时。 从 JMX 1.2 开始,由 MonitorMBean.addObservedObject(javax.management.ObjectName) 取代
 void CounterMonitor.setThreshold(Number value)
          已过时。 从 JMX 1.2 开始,由 CounterMonitor.setInitThreshold(java.lang.Number) 取代
 void CounterMonitorMBean.setThreshold(Number value)
          已过时。 从 JMX 1.2 开始,由 CounterMonitorMBean.setInitThreshold(java.lang.Number) 取代
 

javax.management.openmbeanDeprecated 的使用
 

注释类型为 Deprecatedjavax.management.openmbean 中的字段
static String[] OpenType.ALLOWED_CLASSNAMES
          已过时。 使用 ALLOWED_CLASSNAMES_LIST 取代。
 

javax.security.authDeprecated 的使用
 

注释类型为 Deprecatedjavax.security.auth 中的类
 class Policy
          已过时。 从 JDK 1.4 版本开始,由 java.security.Policy 取代。java.security.Policy 有一个方法:
        public PermissionCollection getPermissions
            (java.security.ProtectionDomain pd)
 
 
ProtectionDomain 有一个构造方法:
        public ProtectionDomain
            (CodeSource cs,
             PermissionCollection permissions,
             ClassLoader loader,
             Principal[] principals)
 
这两个 API 为调用者提供向 Policy 查询基于 Principal 的 Permission 条目的方法。
 

javax.swingDeprecated 的使用
 

注释类型为 Deprecatedjavax.swing 中的字段
protected  boolean JViewport.backingStore
          已过时。 从 Java 2 平台 v1.3 开始
protected  javax.swing.JRootPane.DefaultAction JRootPane.defaultPressAction
          已过时。 从 Java 2 platform v1.3 开始
protected  javax.swing.JRootPane.DefaultAction JRootPane.defaultReleaseAction
          已过时。 从 Java 2 platform v1.3 开始
 

注释类型为 Deprecatedjavax.swing 中的方法
static JScrollPane JTable.createScrollPaneForTable(JTable aTable)
          已过时。 从 Swing version 1.0.2 开始,由 new JScrollPane(aTable) 取代。
 void JComponent.disable()
          已过时。 从 JDK version 1.1 开始,由 java.awt.Component.setEnabled(boolean) 取代。
static void FocusManager.disableSwingFocusManager()
          已过时。 从 1.4 开始,由 KeyboardFocusManager.setDefaultFocusTraversalPolicy(FocusTraversalPolicy) 取代
 void JComponent.enable()
          已过时。 从 JDK version 1.1 开始,由 java.awt.Component.setEnabled(boolean) 取代。
static Component SwingUtilities.findFocusOwner(Component c)
          已过时。 从 1.4 开始,由 KeyboardFocusManager.getFocusOwner() 取代。
 Component JPopupMenu.getComponentAtIndex(int i)
          已过时。 Container.getComponent(int) 取代
 Component JMenuBar.getComponentAtIndex(int i)
          已过时。 getComponent(int i) 取代
static KeyStroke KeyStroke.getKeyStroke(char keyChar, boolean onKeyRelease)
          已过时。 使用 getKeyStroke(char)
 String AbstractButton.getLabel()
          已过时。 - 由 getText 取代
 JMenuBar JInternalFrame.getMenuBar()
          已过时。 从 Swing version 1.0.3 开始,由 getJMenuBar() 取代。
 JMenuBar JRootPane.getMenuBar()
          已过时。 从 Swing 版本 1.0.3 开始,由 getJMenuBar() 取代。
 Component JComponent.getNextFocusableComponent()
          已过时。 从 1.4 版本开始,由 FocusTraversalPolicy 取代。
 String JPasswordField.getText()
          已过时。 从 Java 2 platform v1.2 开始,由 getPassword 来代替。
 String JPasswordField.getText(int offs, int len)
          已过时。 从 Java 2 platform v1.2 开始,由 getPassword 来代替。
 Rectangle ScrollPaneLayout.getViewportBorderBounds(JScrollPane scrollpane)
          已过时。 从 JDK version Swing1.1 开始,由 JScrollPane.getViewportBorderBounds() 取代。
 boolean JViewport.isBackingStoreEnabled()
          已过时。 从 Java 2 平台 1.3 版开始,由 getScrollMode() 取代。
static boolean FocusManager.isFocusManagerEnabled()
          已过时。 从 1.4 开始,由 KeyboardFocusManager.getDefaultFocusTraversalPolicy() 取代
 boolean JComponent.isManagingFocus()
          已过时。 从 1.4 版本开始,由 Component.setFocusTraversalKeys(int, Set)Container.setFocusCycleRoot(boolean) 取代。
 boolean JComponent.requestDefaultFocus()
          已过时。 从 1.4 版本开始,由 FocusTraversalPolicy.getDefaultComponent(Container).requestFocus() 取代
 void JComponent.reshape(int x, int y, int w, int h)
          已过时。 从 JDK 5 开始,由 Component.setBounds(int, int, int, int) 取代。

移动此组件并调整其大小。

 void JViewport.setBackingStoreEnabled(boolean enabled)
          已过时。 从 Java 2 平台 1.3 版开始,由 setScrollMode() 取代。
 void AbstractButton.setLabel(String label)
          已过时。 - 由 setText(text) 取代
 void JInternalFrame.setMenuBar(JMenuBar m)
          已过时。 从 Swing version 1.0.3 开始,由 setJMenuBar(JMenuBar m) 取代。
 void JRootPane.setMenuBar(JMenuBar menu)
          已过时。 从 Swing 版本 1.0.3 开始,由 setJMenuBar(JMenuBar menu) 取代。
 void JComponent.setNextFocusableComponent(Component aComponent)
          已过时。 从 1.4 版本开始,由 FocusTraversalPolicy 取代
 void JTable.sizeColumnsToFit(boolean lastColumnOnly)
          已过时。 从 Swing version 1.0.3 开始,由 doLayout() 取代。
 

javax.swing.plaf.basicDeprecated 的使用
 

注释类型为 Deprecatedjavax.swing.plaf.basic 中的字段
protected  KeyStroke BasicDesktopPaneUI.closeKey
          已过时。 从 1.3 开始。
protected  KeyStroke BasicSplitPaneUI.dividerResizeToggleKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  KeyStroke BasicSplitPaneUI.downKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  KeyStroke BasicTabbedPaneUI.downKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  KeyStroke BasicToolBarUI.downKey
          已过时。 从 Java 2 平台 v1.3 开始。
protected  KeyStroke BasicSplitPaneUI.endKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  KeyStroke BasicSplitPaneUI.homeKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  ActionListener BasicSplitPaneUI.keyboardDownRightListener
          已过时。 从 Java 2 platform v1.3 开始。
protected  ActionListener BasicSplitPaneUI.keyboardEndListener
          已过时。 从 Java 2 platform v1.3 开始。
protected  ActionListener BasicSplitPaneUI.keyboardHomeListener
          已过时。 从 Java 2 platform v1.3 开始。
protected  ActionListener BasicSplitPaneUI.keyboardResizeToggleListener
          已过时。 从 Java 2 platform v1.3 开始。
protected  ActionListener BasicSplitPaneUI.keyboardUpLeftListener
          已过时。 从 Java 2 platform v1.3 开始。
protected  KeyStroke BasicSplitPaneUI.leftKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  KeyStroke BasicTabbedPaneUI.leftKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  KeyStroke BasicToolBarUI.leftKey
          已过时。 从 Java 2 平台 v1.3 开始。
protected  KeyStroke BasicDesktopPaneUI.maximizeKey
          已过时。 从 1.3 开始。
protected  KeyStroke BasicDesktopPaneUI.minimizeKey
          已过时。 从 1.3 开始。
protected  KeyStroke BasicDesktopPaneUI.navigateKey
          已过时。 从 1.3 开始。
protected  KeyStroke BasicDesktopPaneUI.navigateKey2
          已过时。 从 1.3 开始。
protected  KeyStroke BasicInternalFrameUI.openMenuKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  KeyStroke BasicSplitPaneUI.rightKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  KeyStroke BasicTabbedPaneUI.rightKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  KeyStroke BasicToolBarUI.rightKey
          已过时。 从 Java 2 平台 v1.3 开始。
protected  KeyStroke BasicSplitPaneUI.upKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  KeyStroke BasicTabbedPaneUI.upKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  KeyStroke BasicToolBarUI.upKey
          已过时。 从 Java 2 平台 v1.3 开始。
 

注释类型为 Deprecatedjavax.swing.plaf.basic 中的方法
protected  ActionListener BasicSplitPaneUI.createKeyboardDownRightListener()
          已过时。 从 Java 2 platform v1.3 开始。
protected  ActionListener BasicSplitPaneUI.createKeyboardEndListener()
          已过时。 从 Java 2 platform v1.3 开始。
protected  ActionListener BasicSplitPaneUI.createKeyboardHomeListener()
          已过时。 从 Java 2 platform v1.3 开始。
protected  ActionListener BasicSplitPaneUI.createKeyboardResizeToggleListener()
          已过时。 从 Java 2 platform v1.3 开始。
protected  ActionListener BasicSplitPaneUI.createKeyboardUpLeftListener()
          已过时。 从 Java 2 platform v1.3 开始。
protected  int BasicSplitPaneUI.getDividerBorderSize()
          已过时。 从 Java 2 平台 v1.3 开始,由在分隔符上设置边框取代。
 

javax.swing.plaf.metalDeprecated 的使用
 

注释类型为 Deprecatedjavax.swing.plaf.metal 中的类
 class MetalComboBoxUI.MetalComboPopup
          已过时。 从 Java 2 platform v1.4 开始。
 

注释类型为 Deprecatedjavax.swing.plaf.metal 中的方法
protected  void MetalComboBoxUI.editablePropertyChanged(PropertyChangeEvent e)
          已过时。 从 Java 2 platform v1.4 开始。
protected  void MetalComboBoxUI.removeListeners()
          已过时。 从 Java 2 platform v1.4 开始。
 

javax.swing.tableDeprecated 的使用
 

注释类型为 Deprecatedjavax.swing.table 中的字段
protected  int TableColumn.resizedPostingDisableCount
          已过时。 从 Java 2 platform v1.3 开始
 

注释类型为 Deprecatedjavax.swing.table 中的方法
 void TableColumn.disableResizedPosting()
          已过时。 从 Java 2 platform v1.3 开始
 void TableColumn.enableResizedPosting()
          已过时。 从 Java 2 platform v1.3 开始
 

javax.swing.textDeprecated 的使用
 

注释类型为 Deprecatedjavax.swing.text 中的类
 class DefaultTextUI
          已过时。  
 class TableView.TableCell
          已过时。 表单元格如今可以是任何 View 实现。
 

注释类型为 Deprecatedjavax.swing.text 中的方法
protected  TableView.TableCell TableView.createTableCell(Element elem)
          已过时。 现在表单元格可以是任意视图实现并且应该由 ViewFactory 而不是表来产生。
protected  FontMetrics LabelView.getFontMetrics()
          已过时。 FontMetrics 不用于在 JDK 中运行时的字形呈现。
 Shape View.modelToView(int pos, Shape a)
          已过时。  
 int View.viewToModel(float x, float y, Shape a)
          已过时。  
 

javax.swing.text.htmlDeprecated 的使用
 

注释类型为 Deprecatedjavax.swing.text.html 中的字段
static String FormView.RESET
          已过时。 从 1.3 开始,将使用来自 UIManager UIManager property FormView.resetButtonText 的值
static String FormView.SUBMIT
          已过时。 从 1.3 开始,将使用来自 UIManager property FormView.submitButtonText 的值
 

注释类型为 Deprecatedjavax.swing.text.html 中的方法
protected  void HTMLEditorKit.InsertHTMLTextAction.insertAtBoundry(JEditorPane editor, HTMLDocument doc, int offset, Element insertElement, String html, HTML.Tag parentTag, HTML.Tag addTag)
          已过时。 从 Java 2 平台 v1.3 开始,使用 insertAtBoundary
 

org.omg.CORBADeprecated 的使用
 

注释类型为 Deprecatedorg.omg.CORBA 中的类
 class DynamicImplementation
          已过时。 org.omg.CORBA.DynamicImplementation
 interface DynAny
          已过时。 使用新的 DynAny 替代
 interface DynArray
          已过时。 使用新的 DynArray 替代
 interface DynEnum
          已过时。 使用新的 DynEnum 替代
 interface DynFixed
          已过时。 使用新的 DynFixed 替代
 interface DynSequence
          已过时。 使用新的 DynSequence 替代
 interface DynStruct
          已过时。 使用新的 DynStruct 替代
 interface DynUnion
          已过时。 使用新的 DynUnion 替代
 interface DynValue
          已过时。 使用新的 DynValue 替代
 class Principal
          已过时。 已由 CORBA 2.2 取代。
 class PrincipalHolder
          已过时。 Deprecated by CORBA 2.2.
 

注释类型为 Deprecatedorg.omg.CORBA 中的方法
 DynAny ORB.create_basic_dyn_any(TypeCode type)
          已过时。 使用新的 DynAnyFactory API 代替
 DynAny ORB.create_dyn_any(Any value)
          已过时。 使用新的 DynAnyFactory API 代替
 DynArray ORB.create_dyn_array(TypeCode type)
          已过时。 使用新的 DynAnyFactory API 代替
 DynEnum ORB.create_dyn_enum(TypeCode type)
          已过时。 使用新的 DynAnyFactory API 代替
 DynSequence ORB.create_dyn_sequence(TypeCode type)
          已过时。 使用新的 DynAnyFactory API 代替
 DynStruct ORB.create_dyn_struct(TypeCode type)
          已过时。 使用新的 DynAnyFactory API 代替
 DynUnion ORB.create_dyn_union(TypeCode type)
          已过时。 使用新的 DynAnyFactory API 代替
abstract  TypeCode ORB.create_recursive_sequence_tc(int bound, int offset)
          已过时。 使用 create_recursive_tc 和 create_sequence_tc 的组合替代它
 void ServerRequest.except(Any any)
          已过时。 使用 set_exception()
 Principal Any.extract_Principal()
          已过时。 由 CORBA 2.2 取代。
 Current ORB.get_current()
          已过时。 使用 resolve_initial_references
 void Any.insert_Principal(Principal p)
          已过时。 由 CORBA 2.2 取代。
 void DynamicImplementation.invoke(ServerRequest request)
          已过时。 由 Portable Object Adapter 取代
 byte[] Principal.name()
          已过时。 已由 CORBA 2.2 取代。
 void Principal.name(byte[] value)
          已过时。 已由 CORBA 2.2 取代。
 String ServerRequest.op_name()
          已过时。 使用 operation()
 void ServerRequest.params(NVList params)
          已过时。 使用方法 arguments
 void ServerRequest.result(Any any)
          已过时。 使用方法 set_result
 

注释类型为 Deprecatedorg.omg.CORBA 中的构造方法
TCKind(int _value)
          已过时。 不要使用此构造方法,因为根据 OMG 规范,此方法应该是私有的。使用 TCKind.from_int(int) 代替。
 

org.omg.CORBA.portableDeprecated 的使用
 

注释类型为 Deprecatedorg.omg.CORBA.portable 中的方法
 Principal InputStream.read_Principal()
          已过时。 已由 CORBA 2.2 取代。
 void OutputStream.write_Principal(Principal value)
          已过时。 已由 CORBA 2.2 取代。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only